diff --git a/ietf/utils/soup2text.py b/ietf/utils/soup2text.py index 75763649b..173f4d174 100755 --- a/ietf/utils/soup2text.py +++ b/ietf/utils/soup2text.py @@ -87,7 +87,7 @@ def render(node, encoding='latin-1', pre=False): blocks.append(child.text+"\n\n") node.is_block = True else: - if child.name in space_tags and not (words[-1] and words[-1][-1] in [" ", "\t", "\n"]): + if child.name in space_tags and not (words and words[-1] and words[-1][-1] in [" ", "\t", "\n"]): words.append(" ") words.append(child.text) else: