End underline at colon in transcript .docx, not over following space
This commit is contained in:
@@ -333,12 +333,19 @@ def create_transcript_docx(text: str, filename: str):
|
|||||||
p.paragraph_format.left_indent = Inches(0.25)
|
p.paragraph_format.left_indent = Inches(0.25)
|
||||||
|
|
||||||
# Timestamp + speaker name (underline only, not bold)
|
# Timestamp + speaker name (underline only, not bold)
|
||||||
run_label = p.add_run(f"[{ts}] {speaker.upper()}: ")
|
run_label = p.add_run(f"[{ts}] {speaker.upper()}:")
|
||||||
run_label.bold = False
|
run_label.bold = False
|
||||||
run_label.underline = True
|
run_label.underline = True
|
||||||
run_label.font.name = "Courier"
|
run_label.font.name = "Courier"
|
||||||
run_label.font.size = Pt(12)
|
run_label.font.size = Pt(12)
|
||||||
|
|
||||||
|
# Space after colon (no underline)
|
||||||
|
run_space = p.add_run(" ")
|
||||||
|
run_space.bold = False
|
||||||
|
run_space.underline = False
|
||||||
|
run_space.font.name = "Courier"
|
||||||
|
run_space.font.size = Pt(12)
|
||||||
|
|
||||||
# Spoken text (no underline, no bold)
|
# Spoken text (no underline, no bold)
|
||||||
run_txt = p.add_run(content.strip())
|
run_txt = p.add_run(content.strip())
|
||||||
run_txt.bold = False
|
run_txt.bold = False
|
||||||
|
|||||||
Reference in New Issue
Block a user