aafre/resume-builder

refactor: extract shared LaTeX utility functions into a common module

Open

#248 opened on Jan 31, 2026

View on GitHub
 (0 comments) (0 reactions) (0 assignees)TypeScript (15 forks)auto 404
Pythongood first issuerefactor

Repository metrics

Stars
 (6 stars)
PR merge metrics
 (PR metrics pending)

Description

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

  1. Create a new file latex_utils.py in the project root.
  2. Move convert_markdown_formatting_to_latex and _escape_remaining_latex_chars into it.
  3. Update app.py to import from latex_utils.py instead of defining them inline.
  4. Update resume_generator_latex.py to import from latex_utils.py instead of defining them inline.
  5. Verify no other files duplicate these functions.

Acceptance criteria

  • Both functions live in a single latex_utils.py module
  • app.py and resume_generator_latex.py import from latex_utils.py
  • No duplicate definitions remain
  • Existing tests pass (cd resume-builder-ui && npm test for frontend; backend tests if applicable)
  • PDF generation still works correctly via both entry points (app.py and resume_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.

Contributor guide