diff --git a/scraibe/email_sender.py b/scraibe/email_sender.py index b823039..f0cf3db 100644 --- a/scraibe/email_sender.py +++ b/scraibe/email_sender.py @@ -430,6 +430,13 @@ def create_transcript_docx( _configure_base_font(doc) _configure_section_margins(doc) + # Remove the default empty paragraph so line numbering starts + # at the first real line of content (Word counts paragraphs, not text lines). + if doc.paragraphs: + p = doc.paragraphs[0] + if p.text.strip() == "": + p._p.getparent().remove(p._p) + # Enable line numbering for transcript section _enable_line_numbering(doc.sections[0])