Repository navigation
fix(gh-body-audit,gh-body-conventions): prescribe math fence for display math - #244
Merged
Merged
Conversation
…lay math GitHub applies Markdown backslash-escape processing inside a $$ block, so a backslash followed by ASCII punctuation reaches the math renderer as the punctuation alone. A fenced code block with the math info string keeps it. The convention now prescribes the fence for display math and rules out $$...$$. The scan script's limitations comment no longer names $$...$$ display math, and states its line-oriented limit for the code-span check it belongs to.
There was a problem hiding this comment.
Copilot review overview
🟢 Approval recommended
The focused documentation correction is consistent with the reported GitHub behavior and repository versioning rules.
Review effort: Balanced
Findings: None
What changed in this PR
Updates GitHub body guidance to prevent display-math backslash corruption.
Changes:
- Prescribes fenced
mathblocks instead of$$...$$. - Clarifies the math scanner’s line-oriented limitation.
- Bumps plugin version to
2026.10.2.
| File | Description |
|---|---|
skills/gh-body-conventions/SKILL.md |
Updates display-math guidance. |
skills/gh-body-audit/body-math-scan.sh |
Corrects the limitations comment. |
.claude-plugin/marketplace.json |
Applies the required version bump. |
💡 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
GitHub applies Markdown backslash-escape processing to the content of a
$$block before the math renderer receives it, so a backslash followed by ASCII punctuation reaches the renderer as the punctuation alone. A fenced code block with themathinfo string passes its content through.gh-body-conventions§ Math prescribed$$...$$for display math, and now prescribes the fence.Closes #241
Changes
gh-body-conventions§ Math prescribes a fenced code block whose info string ismathfor display math, and rules out$$...$$.skills/gh-body-audit/body-math-scan.shstates that the scan is line-oriented, so its check for inline math wrapped in a code span misses a code span split across source lines, and does not mention$$...$$.metadata.versionin.claude-plugin/marketplace.jsonis2026.10.2.Verification
gh api -X POST /markdown -f mode=gfmon a body whosemathfence holdsx &= a \, b \\ c \{ d \}insidealignedreturned a display<math-renderer>element with\,,\\,\{and\}intact.$$block holdinga \\ b \, c \; d \{ e \} \_ f \alphareturneda \ b , c ; d { e } _ f \alpha.bash skills/gh-body-audit/test-body-math-scan.shprintedAll checks passed.; the script edit is comment-only.mdformathook reportedPassedon the edited files.Notes
gh-body-auditstep 2 dismisses a math-scan hit that sits inside a fenced code block, so it dismisses a\operatornameinside amathfence, although § Math forbids the macro in display math. With$$display math such a hit was outside any fenced code block and was reported. The step dismisses a hit inside an inline code span the same way, and inline math is written as a code span; gh-body-conventions § Math leaves the reach of its rules unstated #242 covers both cases.$$, so a body that still uses it passes the audit; body-math-scan: report $$ display math #243 tracks that check.\\that ends a line inside the fence. The rows still typeset one per line, as seen in a browser on the fence in A complicated math expression is not rendered correctly in pdf jupyter-book/mystmd#1583, whosecasesrows each end in\\.