Use GitHub-Flavored Markdown alert syntax for Note/Tip/Warning/Important blocks
Template tests / tests (push) Successful in 1m40s
Template tests / tests (pull_request) Successful in 1m40s

Markdown export now emits > [!NOTE]/[!TIP]/[!WARNING]/[!IMPORTANT] for
text-block callouts, giving them the same colored/icon-labeled treatment
as the PDF/HTML/DOCX exports on renderers that support GFM alerts
(GitHub, Azure DevOps wikis, etc.), while degrading gracefully to a
plain blockquote elsewhere.
This commit is contained in:
2026-06-13 23:11:02 -05:00
parent fee394f6b7
commit 06fba24645
2 changed files with 9 additions and 4 deletions
+4 -3
View File
@@ -109,10 +109,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 blockquote with its content.
const warnIdx = lines.findIndex((l) => l.startsWith('> **Warning: Access**'));
// 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], '> Admins only.');
assert.equal(lines[warnIdx + 1], '> **Access**');
assert.equal(lines[warnIdx + 2], '> Admins only.');
});
test('Confluence export writes storage-format XML and image attachments', (t) => {