Problem
The splitter recognizes a block start with @\w* followed only by spaces or tabs before the opening delimiter. This is narrower than the BibTeX data-language structure in two important ways:
- line endings and other ordinary whitespace may separate an entry type from its outer
{ or ( delimiter; and
- entry-type identifiers may contain valid non-word punctuation such as
-, :, or /.
Candidates outside the regular expression are currently retained as implicit comments rather than becoming parsed blocks or explicit failures. That makes a structural input disappear from the bibliography model without any parse failure.
Proposed behavior
Recognize the complete block-type token up to whitespace or a reserved BibTeX syntax character, locate the following standard outer delimiter across whitespace, and use the delimiter position rather than assuming it immediately follows the regex match.
Add a matrix requiring every recognized candidate to become either:
- a parsed block for the currently supported curly-brace form; or
- an explicit failed block for the currently unsupported parenthesis form.
This work builds on the explicit parenthesis-failure handling in #533 / PR #571 and exact special-command matching in #568 / PR #574. The implementation PR should retain those as separate prerequisite commits so the broader parser change remains reviewable.
Problem
The splitter recognizes a block start with
@\w*followed only by spaces or tabs before the opening delimiter. This is narrower than the BibTeX data-language structure in two important ways:{or(delimiter; and-,:, or/.Candidates outside the regular expression are currently retained as implicit comments rather than becoming parsed blocks or explicit failures. That makes a structural input disappear from the bibliography model without any parse failure.
Proposed behavior
Recognize the complete block-type token up to whitespace or a reserved BibTeX syntax character, locate the following standard outer delimiter across whitespace, and use the delimiter position rather than assuming it immediately follows the regex match.
Add a matrix requiring every recognized candidate to become either:
This work builds on the explicit parenthesis-failure handling in #533 / PR #571 and exact special-command matching in #568 / PR #574. The implementation PR should retain those as separate prerequisite commits so the broader parser change remains reviewable.