Zerowidth CleanerMeasured guides

CLAUDE WATERMARK REMOVER · MARKDOWN TEST

Why did two paragraphs run together before cleanup?

A line containing only U+200B looks empty but does not separate paragraphs in this fixture.

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

What changed in the preview

The original has two sentences with a third line between them. That middle line contains U+200B, so the parser returns one paragraph rather than two. The callback deletes the hidden character and leaves both line feeds in place. Rendering again yields two separate paragraph elements. When paragraph breaks look wrong, inspect the characters on the divider line instead of adding more newlines blindly. The important observation is that line count stays constant while block count changes, so a newline-only audit would miss the cause in this sample.

What this test covers

This is an isolated separator line between ordinary paragraphs. It does not identify paragraph boundaries that were lost before the text reached the tool.

Measured HTML

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

Before cleanup

<p>First paragraph.
\u200B
Second paragraph.</p>

After cleanup

<p>First paragraph.</p>
<p>Second paragraph.</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.