Zerowidth CleanerMeasured guides

CLAUDE WATERMARK REMOVER · MARKDOWN TEST

Why did pasted bullet lines render as a list only after cleanup?

Cleanup restores the space after the hyphen, so the first line joins the existing list as an item.

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

What changed in the preview

The first hyphen is followed by U+200B and a regular space. The second hyphen is already followed by an ordinary space. The original render puts First item in a plain paragraph and Second item in a one-item list. Once the hidden character is deleted, the parser emits a single list with both items. The line order and item text are unchanged. When a pasted bullet looks visually correct but sits outside its list, compare the first two characters and inspect the rendered list structure.

What this test covers

The fixture uses two top-level hyphen items and no blank lines. Nested indentation, ordered-list interruption and non-ASCII bullets were not tested.

Measured HTML

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

Before cleanup

<p>-\u200B First item</p>
<ul>
<li>Second item</li>
</ul>

After cleanup

<ul>
<li>First item</li>
<li>Second item</li>
</ul>

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.