프롬프트 도감 › No.2393
마크다운 달러 기호 고치기
Fix Markdown Dollar Signs
마크다운 글 속의 돈 표시($)를 수식으로 오해하지 않게 안전하게 고쳐 줘요. 수식과 쉘 명령어는 건드리지 않고 먼저 조사부터 해요.
이럴 때 블로그 글 오류 정리, 문서 사이트 점검, 수식 경고 해결
도구 ChatGPT · Claude · Gemini
프롬프트
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.팁
- 작업 전에 git 상태를 깨끗하게 해 두세요
- 결과 확인 단계에서 이상하면 되돌려요
출처
권리: CC0 (f/prompts.chat). 자유 사용. 기여자: [email protected].