Commit d168445a authored by Miguel Angel Reina Ortega's avatar Miguel Angel Reina Ortega
Browse files

Do not add spaces at the beginning of a paragraph

parent e813119c
Loading
Loading
Loading
Loading
Loading
+1
Changes for generateBaseline/postprocessing.py: 1 added line, 0 removed lines.
Original line number Diff line number Diff line
@@ -2447,6 +2447,7 @@ def update_body_text_style(docx_input, docx_output):
                if child.tag == f"{{{ns['w']}}}t" and child.text:
                    parts.append(child.text)
                elif child.tag in (f"{{{ns['w']}}}tab", f"{{{ns['w']}}}br"):
                    if len(parts) > 0:# don't add space at the beginning of the paragraph
                        parts.append(" ")
        return ''.join(parts).strip()