Repository navigation
馃悰 Abort entry parsing on a dangling field key before } - #602
Merged
Merged
Conversation
MiWeiss
force-pushed
the
fix/splitter-dangling-key
branch
3 times, most recently
from
September 2, 2026 20:00
54b3c74 to
30365a9
Compare
`Splitter._move_to_end_of_entry` returned as soon as it saw a `}`, without
looking at the text between the last comma and that bracket. Since the mark
regex never matches bare identifiers, a key without `=` and value (e.g.
`@article{a, title={x}, year}`) was silently swallowed: the entry was reported
as clean and the token vanished.
A `}` now only ends the entry if nothing but whitespace precedes it (the legal
trailing-comma form); otherwise a BlockAbortedException is raised, so the entry
lands in `library.failed_blocks` with a warning, as for all other syntax errors.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
MiWeiss
force-pushed
the
fix/splitter-dangling-key
branch
from
September 2, 2026 20:03
30365a9 to
035e57a
Compare
Collaborator
Author
|
lgtm |
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.
_move_to_end_of_entryreturns on}without checking the text back to the last comma, and the mark regex never matches bare identifiers. A dangling key is dropped silently.Fix: treat
}as end of entry only when the text back tokey_startis whitespace (the legal trailing-comma form), else abort into a failed block.The branch that pushes a closing brace back now also advances
key_start; without that a normal@article{a, title={x}}would falsely abort.Tests: dangling key in three positions, plus six legal forms pinned. Suite 2609 passed, from 2576.
馃 Generated with Claude Code