Skip to content

Commit 890b8a1

Browse files
committed
Fix potential exception in soup2html again.
- Legacy-Id: 341
1 parent 6b71379 commit 890b8a1

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/utils/soup2text.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def render(node, encoding='latin-1', pre=False):
8787
blocks.append(child.text+"\n\n")
8888
node.is_block = True
8989
else:
90-
if child.name in space_tags and not (words[-1] and words[-1][-1] in [" ", "\t", "\n"]):
90+
if child.name in space_tags and not (words and words[-1] and words[-1][-1] in [" ", "\t", "\n"]):
9191
words.append(" ")
9292
words.append(child.text)
9393
else:

0 commit comments

Comments
 (0)