Skip to content

Recognize complete BibTeX block starts#584

Draft
claell wants to merge 4 commits into
sciunto-org:mainfrom
claell:fix/583-complete-block-starts
Draft

Recognize complete BibTeX block starts#584
claell wants to merge 4 commits into
sciunto-org:mainfrom
claell:fix/583-complete-block-starts

Conversation

@claell

@claell claell commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Recognize ordinary BibTeX whitespace, including line endings, before outer block delimiters.
  • Preserve punctuation permitted in entry-type identifiers instead of treating the candidate as an implicit comment.
  • Require the structural matrix to produce either a parsed block or an explicit failed block; no candidate may disappear silently.

Closes #583.

Dependency and commit structure

This draft currently includes the exact prerequisite behavior from:

Those behaviors remain separate as the first two commits. The issue #583 implementation and its exhaustive visibility matrix are the final two commits. The branch is executable against current main; once the prerequisites merge, it should be rebased so their already-reviewed diffs disappear from this PR.

Validation

  • pytest -p no:cacheprovider -W error tests/splitter_tests/test_splitter_block_start_detection.py: 75 passed.
  • Complete upstream suite: 2,628 passed, 12 skipped, with the four existing deprecation warnings in tests/test_entrypoint.py.
  • Complete pre-commit hook suite: passed.

Review note

This changes the splitter's block-start grammar, so the draft should receive careful maintainer review despite the broad structural matrix. In particular, review should confirm the reserved-character set used to terminate entry-type identifiers and the decision to keep parenthesis syntax explicit but unsupported for now.

AI assistance

This pull request was prepared with ChatGPT Codex using GPT-5.6 Sol with high reasoning effort. Codex assisted with parser analysis, dependency separation, conflict resolution, test design, and validation. Automated validation is not a substitute for maintainer review.

claell added 4 commits July 16, 2026 16:16
* Preserve unsupported entry, string, preamble, and comment source as explicit failures.
* Recover subsequent supported blocks on the same or following line.
Treat custom entry types that extend comment, preamble, or string names as ordinary entries.
* Accept standard whitespace before outer delimiters.
* Preserve punctuation permitted in entry-type identifiers.
* Keep line-separated parenthesis blocks visible as explicit failures.
Require every standard-delimited block candidate to become either a parsed entry or an explicit failed block across whitespace and identifier variants.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Recognize complete BibTeX block starts

1 participant