Record the CommonMark code-span backtick-delimiter gotcha - #1106
Conversation
A literal backtick inside a Markdown code span needs a longer delimiter, not a backslash: CommonMark does not process backslash escapes inside code spans, and delimiter matching is purely lexical, so a single-backtick span wrapping backtick-bearing text closes early and garbles. No content check catches it (well-formed Markdown), so it is in the same blind spot as the MD010-in-fences gotcha already recorded nearby. Surfaced as the accepted round-2 review finding on ai-config#1104 (the example about a backtick pitfall hit a different backtick pitfall). New section in memories/tools.md beside the markdownlint gotchas. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015icfsSybE9vMSt8cUrXB6X
|
Claude finished review — View run Code Review Summary — #1106PR: "Record the CommonMark code-span backtick-delimiter gotcha" — a single-file addition to Verification performed
No bugs, no CLAUDE.md/lab-manual violations, and no hallucinated content found. This is a pure-prose documentation change with no code/logic to assess for correctness bugs. Note: subagent dispatch for this review failed twice with a context-length error (system prompt ~209k tokens > 200k limit) before any task-specific work began — an environment-level constraint, not specific to this PR. Given the PR's small, single-file, prose-only scope, I completed the verification directly instead of retrying subagents. No VerdictReady for merge. |
Post-merge UMS top-up from ai-config#1104's own review lifecycle: recording the accepted round-2 finding as a reusable authoring lesson (it is not one of #1104's four recorded lessons — it surfaced from #1104's review).
The lesson
A literal backtick inside a Markdown inline code span needs a longer delimiter, not a backslash. Per CommonMark's code-span rule, backslash escapes are not processed inside code spans and delimiter matching is purely lexical, so a single-backtick span wrapping backtick-bearing text closes at the first inner backtick and renders as garbled fragments.
Why it earns an entry rather than being a one-off (per
learn-from-review-findings):markdownlint, the semantic-line-break check, andvalidateall passed on Record four lessons from ai-config#1042's review lifecycle #1104; only the reviewer (or a rendered-blob fetch) saw the garble. That is the same blind spot as theMD010-in-fences gotcha the new section sits beside.Change
One new
##section inmemories/tools.md, beside the existing markdownlint gotchas. Hand-written prose, +39 lines, no generated trees. The entry's own example code spans were checked to render correctly (the double-backtick span at the case record wraps a single-backtick-bearing string with no adjacent-backtick run inside it).Verification
origin/main; push verified againstgit ls-remote(matchesHEAD, 1 commit ahead).origin/main...HEAD: 0 non-ASCII on added lines.🤖 Generated with Claude Code
https://claude.ai/code/session_015icfsSybE9vMSt8cUrXB6X
Generated by Claude Code