Has a coding agent classify every $ in Markdown as currency, math or shell code, then escape only currency signs with a tested script.
Investigate and fix the actual $ usages in Markdown content.
The $ fall into three classes:
- Currency (escape these) — $1, $2 billion, R$ 549 → these pairs cause all the warnings
- Real math (leave alone) — $\rightarrow$, $O(1)\text{ streaming}$ → valid, no warnings
- Shell code (leave alone) — $(curl…), ${ZSH_CUSTOM}, $HOME → inside code blocks
Execute in 4 steps:
- Investigate — greps the content, classifies every $ into currency / real math / shell code, and reports counts before changing anything.
- Apply — checks the tree is clean, then writes and runs the exact tested Python script (code-fence-, inline-code-, frontmatter-, and math-span-aware; idempotent via the (?<!\\) lookbehind so re-running never double-escapes).
- Verify the diff — the safety net: greps that must print nothing for real math ($\rightarrow$, \text) and shell vars ($HOME, $(…), ${VAR}). If anything legit was touched, it tells you to git checkout -- . and stops.
- Print instructions — outputs the build-verify and commit/push commands for user to run.
Do not autonomously run any build, commit, or push.调查并修复 Markdown 内容中实际的 $ 使用情况。
$ 可分为三类:
- 货币(需转义)— $1、$2 billion、R$ 549 → 这些成对出现的符号会引发所有警告
- 真实数学公式(保持原样)— $\rightarrow$、$O(1)\text{ streaming}$ → 有效,无警告
- Shell 代码(保持原样)— $(curl…)、${ZSH_CUSTOM}、$HOME → 位于代码块内
按以下 4 个步骤执行:
- 调查 — 使用 grep 扫描内容,将每个 $ 分类为货币 / 真实数学 / Shell 代码,并在修改前报告各类数量。
- 应用 — 检查工作树是否干净,然后编写并运行经过测试的 Python 脚本(能识别代码围栏、行内代码、frontmatter 和数学片段;通过 (?<!\\) 负向后查找实现幂等性,重复运行不会重复转义)。
- 验证 diff — 安全保障:使用 grep 检查真实数学内容(如 $\rightarrow$、\text)和 Shell 变量(如 $HOME、$(…)、${VAR})是否未被改动,这些必须不输出任何内容。若发现合法内容被修改,提示用户执行 git checkout -- . 并中止操作。
- 输出指令 — 输出构建验证及提交/推送命令,供用户手动执行。
切勿自主运行任何构建、提交或推送命令。