Zerowidth CleanerMeasured guides

CLAUDE WATERMARK REMOVER · MARKDOWN TEST

Why did a pasted command become a code block after cleanup?

The cleaner leaves the four spaces. Once the hidden point no longer precedes them, CommonMark sees indentation at the start of the line.

Tested 10 November 2026 · Synthetic fixture · CommonMark.js 0.31.2

What changed in the preview

The original starts with U+200B and then four ordinary spaces before git status. Its HTML is a paragraph. The cleaned source starts with those same four spaces and produces a pre element with a code child. The parser consumes the indentation, so the command inside the code element begins with g. If you intend an example to remain code when pasted into another document, use a fenced block and confirm that it still renders as code in the destination.

What this test covers

This is a standalone line with four ASCII spaces. Tabs, paragraph continuation and indentation inside a list use additional rules.

Measured source and preview

Original Markdown

\u200B    git status

Cleaned Markdown

    git status

The original source and its preview contain a literal U+200B, displayed below as \u200B. The HTML is shown as text.

Before cleanup

<p>\u200B    git status</p>

After cleanup

<pre><code>git status
</code></pre>

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.