Repository navigation
fix(gh-body-audit,gh-body-conventions): state where two math rules apply - #245
Merged
Merged
Conversation
The raw-Unicode rule and the \operatorname rule each name the text they reach by how GitHub renders it: the first binds text rendered as neither code nor math, the second text rendered as math. The audit's math-scan step and the scan's header comment point at those rules in place of a list of positions a hit can sit in, which dismissed \operatorname inside backtick-delimited inline math and inside a math fence.
The two math rules now bind only some of the text a hit can sit in, so the audit step, the scan's header and usage text, and the test header no longer call every flagged construct forbidden. The scan's header also drops a sentence claiming it reports every occurrence, which a line-oriented scan does not do.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The updated guidance consistently resolves the ambiguity from issue #242 without altering scanner behavior.
Review effort: Balanced
Findings: None
What changed in this PR
Clarifies where GitHub body math rules apply and aligns audit guidance with the conventions SSOT.
Changes:
- Scopes Unicode glyph restrictions to non-code, non-math text.
- Scopes
\operatornamerestrictions to rendered math. - Updates scanner documentation and bumps the plugin version.
| File | Description |
|---|---|
.claude-plugin/marketplace.json |
Bumps version to 2026.10.3. |
skills/gh-body-conventions/SKILL.md |
Defines each math rule’s rendering scope. |
skills/gh-body-audit/SKILL.md |
Delegates hit applicability to the corresponding convention. |
skills/gh-body-audit/body-math-scan.sh |
Clarifies scanner scope without changing behavior. |
skills/gh-body-audit/test-body-math-scan.sh |
Corrects the test harness contract description. |
💡 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 forbade raw Unicode math characters "in prose" and forbade\operatornamewith no qualifier, so neither rule said whether it reached text inside a code span, a fenced code block, or math.gh-body-auditstep 2 filled that gap with its own list of positions: it dismissed a math-scan hit inside a fenced code block, inside an inline code span, or in prose that only names the construct. Backtick-delimited inline math is written as a code span and amathfence is a fenced code block, so the list dismissed\operatornamein both, which is the text the rule is about. Each rule now names the text it reaches by how GitHub renders it, and step 2 points at the rules in place of the list.Closes #242
Changes
\operatornamein text GitHub renders as math.gh-body-auditstep 2 flags a glyph or\operatornamehit that sits in the text its § Math rule prohibits it in, and marks any other such hit not applicable. It holds no list of positions.skills/gh-body-audit/body-math-scan.shand the header comment ofskills/gh-body-audit/test-body-math-scan.shname the three scanned classes — Unicode math glyphs,\operatorname, and inline math wrapped in a longer code span — without calling every flagged construct forbidden, and the scan's header leaves the judgment of whether a hit sits in text its rule covers toskills/gh-body-audit/SKILL.md. The scan's regex and exit codes are as they were.metadata.versionin.claude-plugin/marketplace.jsonis2026.10.3.Impact
Four cases get a different outcome from the audit's math-scan step:
\operatornamein backtick-delimited inline math or in amathfence was dismissed and is flagged.\operatornamein text that is neither code nor math and that does more than name the macro was flagged and is not applicable, since the math renderer never receives it.file-issueandfile-pullreqapply § Math by reference and take the reworded rules with no edit of their own.Verification
gh api -X POST /markdowningfmmode, given one body holding each form, returned a<math-renderer>element for backtick-delimited inline math, dollar-delimited inline math, and amathfence; a<code>or<pre>element for a code span, atexfence, and backtick-delimited inline math wrapped in a longer code span; and neither for paragraph text and a table header cell. The three classes the rules name are the ones GitHub's renderer produces.skills/gh-body-audit/SKILL.mdandskills/gh-body-conventions/SKILL.mdas this PR leaves them, ran step 2 on a body that places glyphs and\operatornamein a heading, paragraph text, code spans, atextfence, both inline-math forms, and amathfence, with one line also holding inline math wrapped in a longer code span. The scan printed 14 lines, which the agent split into 17 hits: it flagged the three glyphs in text that is neither code nor math and the three\operatornamein math, and marked the other 11 hits not applicable. That covers the four changed cases above.bash skills/gh-body-audit/test-body-math-scan.shprintedAll checks passed.mdformathook reportedPassedon the edited files.Notes
$$display math, and step 2 has no rule for a$$that is not display math; body-math-scan: report $$ display math #243 tracks both.