Repository navigation
fix(gh-body-audit): report the $$ delimiter in the math scan - #246
Merged
Merged
Conversation
The scan reported no $$, so a body that kept a $$ display block passed the audit although gh-body-conventions rules that form out. The scan now reports every line holding $$. Step 2 judges each $$ on a reported line: one shown not to be rendered by GitHub as a math delimiter is N/A, and any other blocks. It also states that the $$ between two directly adjacent inline-math spans is not a delimiter. The test's frozen-regex runners are folded into one helper that takes the regex as an argument.
Each frozen regex is the previous one plus one alternative, so the later two are built from the earlier ones instead of repeating them. The comments describe what each regex is in place of when it was introduced.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The scanner, audit guidance, regression coverage, and version bump consistently implement issue #243.
Review effort: Balanced
Findings: None
What changed in this PR
Adds $$ detection to the GitHub body math audit, closing #243.
Changes:
- Extends the scanner and audit guidance for
$$. - Adds regression and output tests.
- Bumps the plugin version to
2026.10.4.
| File | Description |
|---|---|
.claude-plugin/marketplace.json |
Bumps the CalVer patch version. |
skills/gh-body-audit/SKILL.md |
Documents classification of $$ hits. |
skills/gh-body-audit/body-math-scan.sh |
Adds the fourth scan class. |
skills/gh-body-audit/test-body-math-scan.sh |
Tests detection, output, and regression behavior. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
gh-body-conventions§ Math rules out display math written between$$delimiters, but the math scan ingh-body-auditreported no$$, so a body that kept such a block passed the audit. The scan now reports every line holding$$, and step 2 ofgh-body-auditsays how to judge each one.Closes #243
Changes
skills/gh-body-audit/body-math-scan.shreports every line holding$$, as a fourth class beside Unicode math glyphs,\operatorname, and inline math neutralized by an enclosing code span. Its exit codes are unchanged: 0 clean, 1 hits, 2 usage or environment error.skills/gh-body-audit/SKILL.mdjudges each$$on a reported line: one that inspection shows GitHub does not render as a math delimiter is⊘ N/A, and any other is⚠. An unresolved⚠blocks the step that called the audit, so a$$that cannot be classified blocks it.$$between two directly adjacent backtick-delimited inline-math spans is not a math delimiter: GitHub renders the two spans as inline math.skills/gh-body-audit/test-body-math-scan.shcovers the new class with four hit cases, two clean cases, an assertion on the printed lines, and a differential showing that the scan regex without the$$alternative reports a$$block clean. The test keeps three frozen regexes, the scan regex cut off after its first, second, and third class; each is built from the previous one, and one helper runs any of them.metadata.versionin.claude-plugin/marketplace.jsonis2026.10.4.Impact
Step 2 of
gh-body-auditis the scan's only caller. A body that mentions$$in a code span now exits the scan with 1 and takes a⊘ N/Aline where it used to pass silently. A bare$$in prose takes⚠unless inspection shows it renders as plain text; putting it in a code span clears the hit either way.Verification
bash skills/gh-body-audit/test-body-math-scan.shprintedokfor all 27 checks.skills/gh-body-audit/body-math-scan.shon a body holding a$$block exited 0 before the change and 1 after it.gh api -X POST /markdowningfmmode, run on seven one-construct bodies, returned:$$on its own line above and below\{a\}<math-renderer>block whose content is{a}, the backslashes gone$$x+y$$inside a sentence<math-renderer>echo $$in a fencedshblockkill $$in a code span<math-renderer>elements$$$$, each followed by a space