Zerowidth CleanerMeasured guides

CLAUDE WATERMARK REMOVER · MARKDOWN TEST

Why is the opening backtick fence shown as text?

Check whether the opening fence contains three consecutive backticks. A single hidden space between the second and third can leave your code in a paragraph.

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

What changed in the preview

In the original fixture, CommonMark.js produced a paragraph containing the broken opening line and `print(4)`. The final three backticks started an empty code block because there was no open fence to close. After cleanup the same final line closed the restored opening fence, and `print(4)` became the contents of the only block.

What this test covers

Compare the block contents as well as the number of blocks: the broken preview did contain a code element, but it was empty. This test starts at the left margin. Fences inside lists or quotes introduce separate indentation rules.

Measured source and preview

Original Markdown

``\u200B`
print(4)
```

Cleaned Markdown

```
print(4)
```

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

Before cleanup

<p>``\u200B`
print(4)</p>
<pre><code></code></pre>

After cleanup

<pre><code>print(4)
</code></pre>

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.