Zerowidth CleanerMeasured guides

CLAUDE WATERMARK REMOVER · MARKDOWN TEST

Why did a Markdown renderer stop showing a literal HTML tag?

If a tag name becomes valid after cleanup, the renderer may treat it as HTML. In our safe preview, the repaired opening `<sub>` tag was omitted and the text `2` stayed visible.

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

What changed in the preview

The original opening tag had U+200B inside `sub` and was serialized as escaped text. The intact closing tag was already recognized as raw HTML and omitted. Once the opening spelling was repaired, both tags became omission comments, with the digit still between them. The cleaner did not remove either tag from the Markdown.

What this test covers

The test used CommonMark.js with `safe: true`. A destination that permits or sanitizes raw HTML differently can present a different result. If the tag is meant to be shown to readers as an example, use a code span and confirm it displays literally.

Measured source and preview

Original Markdown

Line before <su\u200Bb>2</sub>.

Cleaned Markdown

Line before <sub>2</sub>.

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

Before cleanup

<p>Line before &lt;su\u200Bb&gt;2<!-- raw HTML omitted -->.</p>

After cleanup

<p>Line before <!-- raw HTML omitted -->2<!-- raw HTML omitted -->.</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.