Skip to content

Commit

Permalink
Merge pull request #351 from transifex/dockx_fix
Browse files Browse the repository at this point in the history
Fix for Docx parser
  • Loading branch information
foteinigk authored Aug 6, 2024
2 parents aa7e7f4 + 931360f commit c1b0d48
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openformats/formats/office_open_xml/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,7 @@ def compile_paragraph(cls, paragraph, rels_soup, stringset, is_rtl=False):
# the text parts of the translation are more that the
# text parts of the document, so we will compress the
# remaining translation parts into one string
if len(translation_soup) > 0:
if len(translation_soup) > 0 and last_element and last_element.contents:
translation = last_element.contents[0] + \
"".join([six.text_type(t) for t in translation_soup]
)
Expand Down

0 comments on commit c1b0d48

Please sign in to comment.