cplusplus / cplusplus/draft

[checks] Add check for trailing `\br` in a `bnf` environment

Open
#8,494 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

P3-Other
Dominant language
TeX
Stars
221
Forks
813
Avg merge
16h 4m
Merged PRs (30d)
36

Description

It's quite easy to make a mistake such as:

\begin{bnf}
\nontermdef{line-directive}\br
    \terminal{\# line} pp-tokens new-line\br
\end{bnf}

If I recall correctly, this trailing \br is not ignored, but simply renders as an unwanted blank line. I have made this error during 2025 post-Sofia motions I believe.

It seems like it would be fairly easy to grep for \br, followed by whitespace,
followed by \end{bnf}.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by locating the repository's existing checks and the TeX sources containing bnf environments; use the reported pattern as the initial case to verify. Done means the check detects \br followed by whitespace before \end{bnf} without flagging valid cases.

Written by the indexing model from the issue text.

Assessment

Tech stack
tex
Domain
tooling
Issue type
Feature
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.