lazier

personal summarizer
Log | Files | Refs | README

commit 266d74e143e5940bcaa6e3d07434c50e2e434d08
parent 140a05669abf37e69850f24d9e84504346f1914f
Author: Pablo Murad <pablo@pablomurad.com>
Date:   Sat, 31 Jan 2026 16:00:59 -0300

changes

Diffstat:
Mlazier/core/formats.py | 4++--
Mlazier/docx_generator.py | 8++++----
2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/lazier/core/formats.py b/lazier/core/formats.py @@ -321,7 +321,7 @@ def export_pdf( for para in summary.split('\n\n'): if not para.strip(): continue - text = sanitize_xml_string(para.strip()).replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('\n', '<br/>') + text = sanitize_xml_string(para.strip()).replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('\n', '<br/>').replace('**', '') story.append(Paragraph(text, body_style)) story.append(Spacer(1, 16)) @@ -331,7 +331,7 @@ def export_pdf( for para in (transcription_safe.split('\n\n') if transcription_safe else []): if not para.strip(): continue - text = para.strip().replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('\n', '<br/>') + text = para.strip().replace('&', '&amp;').replace('<', '&lt;').replace('>', '&gt;').replace('\n', '<br/>').replace('**', '') story.append(Paragraph(text, body_style)) doc.build(story) diff --git a/lazier/docx_generator.py b/lazier/docx_generator.py @@ -183,9 +183,9 @@ def _parse_markdown_to_runs(text: str, paragraph): # Reconstrói o texto com formatação last_pos = 0 for start, end, content, style in matches: - # Adiciona texto antes do match + # Adiciona texto antes do match (remove ** soltos que não formaram negrito) if start > last_pos: - text_before = sanitize_xml_string(text[last_pos:start]) + text_before = sanitize_xml_string(text[last_pos:start]).replace('**', '') paragraph.add_run(text_before) # Adiciona run formatado @@ -200,9 +200,9 @@ def _parse_markdown_to_runs(text: str, paragraph): last_pos = end - # Adiciona texto restante + # Adiciona texto restante (remove ** soltos que não formaram negrito) if last_pos < len(text): - text_remaining = sanitize_xml_string(text[last_pos:]) + text_remaining = sanitize_xml_string(text[last_pos:]).replace('**', '') paragraph.add_run(text_remaining)