mirror of
https://github.com/MadsLorentzen/ai-job-search.git
synced 2026-11-02 13:12:50 +00:00
find_orphans() compared each line's left edge with the document margin: an un-indented last line followed by an indented first line was an entry header orphaned from its bullets. A list marker moves a line's left edge without moving its text, so the rule misread two templates: * one that merges each bullet's marker into its first line (#481): a bullet wrapping across the break was reported as an orphaned header, and a real orphaned header followed by such bullets was not reported; * the stock CV, when its outer marker extracts as a line of its own: a [Job Title] header left at the foot of a page, bullets overleaf, was not reported (its text at x70.4 counts as indented), and a one-line list item whose outer marker is set 1.3pt below it - so the marker sorts last on the page - was reported as a split bullet although the whole item is on that page. Following discussion #481, the rule now reads text x: * parse_pdf records where a line's text starts after leading LIST_MARKERS words (Line.text_left, defaulted). The set is the agreed Unicode bullets without the dashes (`• ‣ ▪ ● ·`): a bullet's second line may open with an em dash, and the stock Honors item's second line opens with an en dash. Other glyphs are text, so a line that merges the stock outer marker (`○` on some setups, an emoji on others) keeps the marker's x, as the left-edge rule read it; * find_orphans compares the text x of a page's last printed line with that of the next page's first printed line, and reports an orphaned header when the latter is more than INDENT_PT further in. Bbox lines whose tops are within SAME_PRINTED_LINE_PT (3pt) are one printed line: pdftotext's rounded-yMin buckets split a line where a bold word sits 0.2pt off, or where a marker sits 1.3pt below its text. A line whose text starts more than SET_IN_LIMIT_PT (60pt) past the margin is set right or centred (a running header) and is skipped as the opener; * a page ending on a marker with no text beside it keeps the lone-marker report, with its condition and message unchanged. Stock cv/main_example.tex, \vspace* of 0-600pt in 8pt steps before four entries, 304 lualatex builds (and the same 304 with xelatex): this adds 15 reports, each a [Job Title] header at the foot of a page with its bullets overleaf; the other 289 builds give byte-identical output. The reported. A two-line outer item whose marker sorts last and that wraps across the break is no longer reported as a split bullet: it is read like the #481 wrapped bullet, which is expected clean. Tests: TestOrphansReadTextX (13; 7 fixes and the wrapped two-line item fail on master's logic, 5 pin behaviour master already had) and TestTextStart (4). On Python 3.10-3.14 `python -W error::SyntaxWarning -m unittest discover -s tests -t .` passes 520 tests (master 503); lint_skills.py, check_framework_version.py and security_guards.py OK.