Skip to content

Commit 4436a11

Browse files
authored
[Comp-758-3] IR docx stacked section headers (#681)
1 parent ff7e136 commit 4436a11

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

compliance-api/src/compliance_api/services/inspection_record/inspection_record_doc_generator.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,13 +485,15 @@ def _add_requirement_details_table(doc, req):
485485
for document in documents:
486486
# Add section info
487487
if document.get('section_number') or document.get('section_title'):
488+
section_para = cell.add_paragraph()
488489
section_text = ''
489490
if document.get('section_number'):
490491
section_text = f"Section {document.get('section_number')} "
491492
if document.get('section_title'):
492493
section_text += document.get('section_title')
493-
run = para.add_run(section_text)
494+
run = section_para.add_run(section_text)
494495
run.bold = True
496+
section_para.add_run('\n')
495497

496498
# Add description
497499
if document.get('description'):

0 commit comments

Comments
 (0)