Zerowidth CleanerMeasured guides

CLAUDE WATERMARK REMOVER · MARKDOWN TEST

Why did a draft note disappear from my Markdown preview after cleanup?

Cleanup repairs the HTML comment opener. The tested renderer then omits the recognized HTML block in safe mode.

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

What changed in the preview

The draft note begins with an angle bracket and exclamation mark, but U+200B splits that punctuation from the two hyphens. The original HTML shows the note as escaped paragraph text. After deletion the source contains a valid comment opener. The renderer replaces the block with an omission marker and leaves Release summary in its own paragraph. The note is still present in the cleaned source. Remove private notes from the source file before sharing it, even when a preview hides them.

What this test covers

This checks CommonMark.js with safe rendering enabled. Editors that preserve raw HTML may retain the comment in the generated HTML, so preview visibility is no test of redaction.

Measured source and preview

Original Markdown

<!\u200B-- reviewer note -->

Release summary.

Cleaned Markdown

<!-- reviewer note -->

Release summary.

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

Before cleanup

<p>&lt;!\u200B-- reviewer note --&gt;</p>
<p>Release summary.</p>

After cleanup

<!-- raw HTML omitted -->
<p>Release summary.</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.