Zerowidth CleanerMeasured guides

CLAUDE WATERMARK REMOVER · MARKDOWN TEST

Why did spaces around inline code change in the Markdown preview?

The cleaner deletes U+200B; the parser then removes one surrounding space on each side of the inline code.

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

What changed in the preview

The original code span begins with U+200B, then a space, and ends with a space. The original code element therefore keeps the two ordinary spaces around sample, along with the hidden character. In the cleaned Markdown source both ordinary spaces still exist inside the backticks. Only after rendering are those spaces absent from the code element. If the exact spacing belongs to an example that readers will copy, compare the rendered code text with the intended literal and keep a plain text fixture alongside the Markdown.

What this test covers

One single-backtick span with a non-space word was measured. This does not cover fenced blocks or spans made entirely of spaces.

Measured HTML

The first preview contains a literal U+200B, displayed below as \u200B. The HTML is shown as text.

Before cleanup

<p>See <code>\u200B sample </code> today.</p>

After cleanup

<p>See <code>sample</code> today.</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.