Conversation
* 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.
|
Hi @claell — same note across all of your July 16 issues and PRs (#567–#597), apologies for the repetition. Closing this. Passing CI isn't evidence the underlying claim is real — it just means generated tests match generated code. The batch's timing, structure, and forward-referenced numbers point to this being AI-generated rather than manually found and checked, and reviewing it properly would take more effort than a targeted pass over the parser myself. If this fixes something you actually hit: open a small, human-verified PR against a reopened issue with a real repro, and I'll review it in good faith. Any nontrivial design or API choice needs to be discussed and agreed first, not decided inside a PR. Please disclose and verify AI-assisted work before submitting going forward. |
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 inEntry.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
EntryCommentobjects. No dialect flag is required merely to avoid losing Biber input.Validation
tests/test_entrypoint.py.Review note
This adds public model state to
Entryand changes splitter marks, so careful API and parser review is requested. The branch includes the same small_skip_marks_beforeiterator 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.