CLAUDE WATERMARK REMOVER · MARKDOWN TEST
Why did a pasted Markdown title become a heading after cleanup?
It becomes a heading because cleanup restores the required space immediately after the #.
What changed in the preview
The test starts with a hash, U+200B and then a regular space. Before cleanup the parser emits a paragraph containing the hash. After the callback removes that one code point, the same parser emits an h1 containing Review notes. The word sequence survives, but the block type changes. If the hash is meant to be printed literally in your draft, escape it in Markdown and preview again. When reviewing a pasted outline, compare the actual headings in the destination preview as well as the characters in the source.
What this test covers
One single-hash opener at the start of a line; heading attributes and platform-specific anchor generation are outside this test.
Measured HTML
The first preview contains a literal U+200B, displayed below as \u200B. The HTML is shown as text.
Before cleanup
<p>#\u200B Review notes</p>
After cleanup
<h1>Review notes</h1>
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.