🐛 Report parenthesis-delimited blocks as parsing failures - #618
Closed
MiWeiss wants to merge 1 commit into
Closed
Conversation
Standard BibTeX allows `(...)` as block delimiters. The splitter's mark
regex only recognised `{`, so `@article(key, ...)` was silently swallowed
as an implicit comment: no entry, no warning, no failed block.
Such blocks now yield a ParsingFailedBlock naming the unsupported
delimiter, and parsing resumes after the closing parenthesis so that
subsequent brace-delimited blocks still parse. This is fail-closed only;
parenthesis-delimited blocks are still not parsed.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Standard BibTeX allows
(...)as block delimiters. The splitter's mark regex only recognised{, so such blocks were silently swallowed as implicit comments — no entry, no warning, no failed block:@type(now produces aParsingFailedBlocknaming the unsupported delimiter, and parsing resumes after the closing parenthesis so subsequent{-delimited blocks still parse. Applies uniformly to@comment(,@string(and@preamble(too.This is fail-closed only — it does not add parenthesis support. It only makes the loss visible; the raw text is still preserved on the failed block.
Tests: 29 new cases in
tests/splitter_tests/test_splitter_parenthesis_blocks.py(issue repro, recovery, line numbers, stray(inert). Full suite green: 2759 passed, 12 skipped.Fixes #533
🤖 Generated with Claude Code