mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-05-02 11:06:07 -04:00
Merge branch 'develop' into travis/login-terms
This commit is contained in:
commit
49a044aa5f
43 changed files with 308 additions and 163 deletions
|
@ -596,10 +596,13 @@ def _iterate_over_text(tree, *tags_to_ignore):
|
|||
# to be returned.
|
||||
elements = iter([tree])
|
||||
while True:
|
||||
el = next(elements)
|
||||
el = next(elements, None)
|
||||
if el is None:
|
||||
return
|
||||
|
||||
if isinstance(el, string_types):
|
||||
yield el
|
||||
elif el is not None and el.tag not in tags_to_ignore:
|
||||
elif el.tag not in tags_to_ignore:
|
||||
# el.text is the text before the first child, so we can immediately
|
||||
# return it if the text exists.
|
||||
if el.text:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue