Skip to content

fix(gh-body-audit,gh-body-conventions): prescribe math fence for display math - #244

Merged
ultimatile merged 1 commit into
mainfrom
fix/241-math-fence-convention
Oct 3, 2026
Merged

ultimatile merged 1 commit into
mainfrom
fix/241-math-fence-convention

Conversation

@ultimatile

Copy link
Copy Markdown
Owner

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 the math info 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 is math for display math, and rules out $$...$$.
  • The limitations comment in skills/gh-body-audit/body-math-scan.sh states 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.version in .claude-plugin/marketplace.json is 2026.10.2.

Verification

  • gh api -X POST /markdown -f mode=gfm on a body whose math fence holds x &= a \, b \\ c \{ d \} inside aligned returned a display <math-renderer> element with \,, \\, \{ and \} intact.
  • The same endpoint on a $$ block holding a \\ b \, c \; d \{ e \} \_ f \alpha returned a \ b , c ; d { e } _ f \alpha.
  • bash skills/gh-body-audit/test-body-math-scan.sh printed All checks passed.; the script edit is comment-only.
  • The pre-commit mdformat hook reported Passed on the edited files.

Notes

…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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 math blocks 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.

@ultimatile
ultimatile merged commit 5b16b6d into main Oct 3, 2026
1 check passed
@ultimatile
ultimatile deleted the fix/241-math-fence-convention branch October 3, 2026 07:14
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.

gh-body-conventions: $$ display math loses backslash-punctuation macros

2 participants