CLAUDE WATERMARK REMOVER · MARKDOWN TEST
Why did an inline code span end at the first backtick?
Check the length of the closing backtick run. Removing one zero-width space joined our two closing backticks so they could match the two at the start.
What changed in the preview
The original two-tick opener had no matching two-tick closer. A single interior tick instead matched the first tick of the broken closing run, producing an inline code element around ` y` and leaving the earlier text outside. Cleanup produced one code element containing `x`, a literal backtick, and `y`, with no stray delimiters.
What this test covers
This example concerns delimiter run length, not the rule for trimming a space on both sides of code span contents. Inspect the whole serialized code element, since the presence of a code element alone did not distinguish the correct preview from the broken one.
Measured source and preview
Original Markdown
``x ` y`\u200B`
Cleaned Markdown
``x ` y``
The original source and its preview contain a literal U+200B, displayed below as \u200B. The HTML is shown as text.
Before cleanup
<p>``x <code> y</code>\u200B`</p>
After cleanup
<p><code>x ` y</code></p>
Reproduce locally
Save reproduce.cjs and tested-app.js together. Run npm install --no-save commonmark@0.31.2, then node reproduce.cjs. Compare with the recorded input, output and HTML. The test uses the homepage callback with a minimal DOM. It does not use Claude output or test statistical watermark detection.
See the CommonMark specification and another measured Markdown case.