get_text: return blank text when 'runs' is empty
This commit is contained in:
parent
49f10cb89a
commit
7c4298217b
@ -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:
|
||||
|
Loading…
x
Reference in New Issue
Block a user