CLAUDE WATERMARK REMOVER · MARKDOWN TEST
Why did a Markdown reference link leave stray brackets?
Check whether the second bracket pair is really empty. Removing one zero-width space from our `[route][]` fixture restored the collapsed reference link.
What changed in the preview
The definition `[route]: /map` was recognized both times and remained absent from the HTML. Initially the second bracket pair contained U+200B, so it did not act as the empty pair that reuses `route`. After cleanup, CommonMark.js emitted a link with visible label `route` and destination `/map`.
What this test covers
Inspect the bracket contents separately from the definition. Fixing the spelling of a valid definition does not make a nonempty second bracket pair empty. This fixture has no other label definitions or renderer extensions that might resolve the source differently.
Measured source and preview
Original Markdown
See [route][\u200B]. [route]: /map
Cleaned Markdown
See [route][]. [route]: /map
The original source and its preview contain a literal U+200B, displayed below as \u200B. The HTML is shown as text.
Before cleanup
<p>See [route][\u200B].</p>
After cleanup
<p>See <a href="/map">route</a>.</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.