Skip to content

Skip continuation lines for ignored fields - #76

Open
Ychris12138 wants to merge 1 commit into
MrTango:mainfrom
Ychris12138:fix/ignored-field-continuations
Open

Ychris12138 wants to merge 1 commit into
MrTango:mainfrom
Ychris12138:fix/ignored-field-continuations

Conversation

@Ychris12138

Copy link
Copy Markdown

Ignoring a tag currently skips only its first line. Continuation lines are appended to the previous retained field, or stored as unknown content if no field precedes the ignored tag. For example, TI - Title\nN1 - ignored\ncontinued with ignore=["N1"] produces the title Title continued.

Track the ignored tag as the current field and skip its continuation lines. Parsing resumes normally at the next retained tag. Regression tests cover an ignored field at the beginning of a record, after a title or author, and the default ignored FN tag in WokParser.

Validation on Python 3.12:

  • All four new regression cases fail on the original implementation.
  • coverage run -m pytest --benchmark-skip: 40 passed, 2 benchmark tests skipped.
  • coverage report -m: 99.6%, above the repository's 99.5% threshold.
  • ruff check ., ruff format . --check, and git diff --check passed.

Copilot AI balanced review requested due to automatic review settings October 19, 2026 17:08

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

This branch has not been deployed

No deployments
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.

2 participants