| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
* Keep percent-comment lines out of active bibliography fields. * Retain comment content and field-boundary positions during canonical writes. * Preserve comments across edits, CRLF input, and entry copying.
| Back | FazBrowse Home | New Git URL |
Summary
Closes #372.
Default behavior
This is implemented in the structural parser rather than as opt-in middleware. A middleware cannot recover a comment that has already caused field parsing to fail or absorb subsequent syntax. The parser therefore recognizes a line whose first non-whitespace character is % inside an entry and retains it in Entry.comments; it does not expose the text as an active field.
The canonical writer preserves content and relative field boundaries, not byte-identical whitespace. Callers may inspect or edit the explicit EntryComment objects. No dialect flag is required merely to avoid losing Biber input.
Validation
Review note
This adds public model state to Entry and changes splitter marks, so careful API and parser review is requested. The branch includes the same small _skip_marks_before iterator helper independently needed by PR #571; whichever PR merges second should remove the duplicate during rebase.
AI assistance
This pull request was prepared with ChatGPT Codex using GPT-5.6 Sol with high reasoning effort. Codex assisted with architecture analysis, dependency removal, edge-case testing, and validation. Automated validation is not a substitute for maintainer review.