aafre/resume-builder
Vedi su GitHubrefactor: extract shared LaTeX utility functions into a common module
Open
#248 aperta il 31 gen 2026
Pythongood first issuerefactor
Metriche repository
- Star
- (6 star)
- Metriche merge PR
- (Metriche PR in attesa)
Descrizione
Summary
convert_markdown_formatting_to_latex and _escape_remaining_latex_chars are duplicated in two files:
app.py(lines 591, 640)resume_generator_latex.py(lines 39, 86)
These should be extracted into a shared utility module to prevent them from drifting out of sync.
What to change
- Create a new file
latex_utils.pyin the project root. - Move
convert_markdown_formatting_to_latexand_escape_remaining_latex_charsinto it. - Update
app.pyto import fromlatex_utils.pyinstead of defining them inline. - Update
resume_generator_latex.pyto import fromlatex_utils.pyinstead of defining them inline. - Verify no other files duplicate these functions.
Acceptance criteria
- Both functions live in a single
latex_utils.pymodule -
app.pyandresume_generator_latex.pyimport fromlatex_utils.py - No duplicate definitions remain
- Existing tests pass (
cd resume-builder-ui && npm testfor frontend; backend tests if applicable) - PDF generation still works correctly via both entry points (
app.pyandresume_generator_latex.py)
Context
Flagged in PR #244 review. The functions were added to resume_generator_latex.py as part of the LaTeX escaping fix, mirroring the existing implementation in app.py.