Style markdown callouts with HTML

This commit is contained in:
2026-06-15 14:32:14 -05:00
parent 61e3c812a0
commit f79bbfed9f
3 changed files with 26 additions and 6 deletions
+5 -5
View File
@@ -137,11 +137,11 @@ test('Markdown export: TOC anchors resolve, images exist, blocks rendered', (t)
assert.equal(lines[fenceStart + 1], '0 2 * * * /usr/local/bin/acmesync --backup');
assert.equal(lines[fenceStart + 2], '```');
assert.ok(lines.some((l) => /^\| Day \| Window \|$/.test(l)), 'table header row');
// Warning text block became a GFM alert blockquote with its content.
const warnIdx = lines.findIndex((l) => l.startsWith('> [!WARNING]'));
assert.ok(warnIdx > 0);
assert.equal(lines[warnIdx + 1], '> **Access**');
assert.equal(lines[warnIdx + 2], '> Admins only.');
// Warning text block became a styled HTML callout with its content.
assert.ok(md.includes('<div class="sf-callout sf-callout-warning"'));
assert.ok(md.includes('border-left: 4px solid #f59e0b'));
assert.ok(md.includes('Warning: Access'));
assert.ok(md.includes('<p>Admins only.</p>'));
});
test('Wiki.js export: TOC is included, wiki callouts render, images exist', (t) => {