Output formats: allow tags with pure whitespace inside.
This commit is contained in:
parent
1f91582ccd
commit
fda2890711
1 changed files with 1 additions and 1 deletions
|
|
@ -39,7 +39,7 @@ class OutputFormat(object):
|
|||
def fix_spaces(self, tagged_text):
|
||||
for tag, text in tagged_text:
|
||||
stripped_text = text.rstrip()
|
||||
if len(stripped_text) < len(text):
|
||||
if stripped_text and len(stripped_text) < len(text):
|
||||
traling_whitespace = text[len(stripped_text):]
|
||||
yield tag, stripped_text
|
||||
yield None, traling_whitespace
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue