get_text: return blank text when 'runs' is empty

This commit is contained in:
James Taylor 2018-07-02 21:55:39 -07:00
parent 49f10cb89a
commit 7c4298217b

View File

@ -371,7 +371,11 @@ def get_text(node):
try:
return node['simpleText']
except KeyError:
pass
try:
return node['runs'][0]['text']
except IndexError: # empty text runs
return ''
def get_formatted_text(node):
try: