import assert from "node:assert/strict"; import test from "node:test"; import { htmlToMarkdown } from "../../../src/lib/workspace/htmlToMarkdown.ts"; test("Windows HTML clipboard fragment comments do not become table content", () => { const html = '
TickerName
ADBE.USAdobe
ADSK.USAutodesk
'; assert.equal(htmlToMarkdown(html), '| Ticker | Name |\n| --- | --- |\n| ADBE.US | Adobe |\n| ADSK.US | Autodesk |'); }); test("comments inside cells preserve adjacent text and formatting", () => { const html = '
Notes
First part
Second
'; assert.equal(htmlToMarkdown(html), '| Notes |\n| --- |\n| First part
**Second** |'); }); test("escaped comment text remains user content", () => { assert.equal(htmlToMarkdown('

<!--Example-->

'), ''); });