Skip to content

Fix resume section detection on text with leading whitespace - #74

Open
deepusnath wants to merge 1 commit into
codepath:mainfrom
deepusnath:fix/resume-parser-leading-whitespace
Open

Fix resume section detection on text with leading whitespace#74
deepusnath wants to merge 1 commit into
codepath:mainfrom
deepusnath:fix/resume-parser-leading-whitespace

Conversation

@deepusnath

@deepusnath deepusnath commented Aug 25, 2026

Copy link
Copy Markdown

_detect_sections() and _strip_markdown() anchored their regexes to the exact start of a line, so section headers and markdown headers indented with leading spaces/tabs (common in PDF-extracted text and in-code fixtures) were never matched. Allow optional leading whitespace before the anchored patterns.

Fixes #54

Summary

Issue

Closes #

Changes

Testing

  • CI is green on this PR (all five jobs) — required for review
  • Unit tests pass (make test-unit)
  • Integration tests pass (make test-integration)
  • Linter passes (make lint)
  • Type checker passes (make typecheck)
  • New/updated tests cover the changes
  • If this fixes a seeded bug: removed its @pytest.mark.xfail marker (and any
    matching suppression in pyproject.toml)

Screenshots / Demo

Notes for Reviewers

_detect_sections() and _strip_markdown() anchored their regexes to the
exact start of a line, so section headers and markdown headers indented
with leading spaces/tabs (common in PDF-extracted text and in-code
fixtures) were never matched. Allow optional leading whitespace before
the anchored patterns.

Fixes codepath#54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resume section detection fails on text with leading whitespace

2 participants