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

Keep lines all toghether in code blocks

parent 1ce05c8f
Loading
Loading
Loading
Loading
Loading
+7
Changes for generateBaseline/postprocessing.py: 7 added lines, 0 removed lines.
Original line number Diff line number Diff line
@@ -3346,6 +3346,13 @@ def update_source_code_style(docx_input, docx_output):
        
        # Get the paragraph element to add borders
        pPr = elem.getparent()
        if pPr is None:
            continue
        # One paragraph, one line per run separated by w:br. keepLines
        # keeps those lines on the same page.
        if not pPr.xpath('./w:keepLines', namespaces=ns):
            keepLines = etree.Element(f"{{{ns['w']}}}keepLines")
            pPr.append(keepLines)
        add_borders_to_paragraph(pPr)
        add_shading_to_element(pPr)