CLAUDE WATERMARK REMOVER · MARKDOWN TEST
Why did a Markdown code block lose its language hint?
Check the fence's language token. In our test, removing a zero-width space restored the `language-javascript` class while leaving the code itself unchanged.
What changed in the preview
The opening tildes and the closing fence were recognized in both runs. The serialized code element held the same `const n = 3;` line in both runs. Only the class differed: the synthetic U+200B split `javascript` inside the info string, so a selector for the exact language name would miss the original class.
What this test covers
Compare the class and the code payload separately in your preview. CommonMark.js emitted a language class in this test; we did not load a syntax highlighter or measure any coloring. A renderer that ignores the info string may show no difference.
Measured source and preview
Original Markdown
~~~ja\u200Bvascript const n = 3; ~~~
Cleaned Markdown
~~~javascript const n = 3; ~~~
The original source and its preview contain a literal U+200B, displayed below as \u200B. The HTML is shown as text.
Before cleanup
<pre><code class="language-ja\u200Bvascript">const n = 3; </code></pre>
After cleanup
<pre><code class="language-javascript">const n = 3; </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.