aafre / aafre/resume-builder

refactor: extract shared LaTeX utility functions into a common module

Open
#248 0 comments 0 reactions 0 assignees View on GitHub
good first issue Python refactor
Dominant language
TypeScript
Stars
6
Forks
15
Avg merge
7d 22h
Merged PRs (30d)
2

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

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.