[#1005, remark-wiki-link]: Parse note embeds as regular wiki links (#1006)

This commit is contained in:
Ola Rubaj
2023-08-14 15:23:28 +02:00
committed by GitHub
parent 84cc6cf82b
commit 6418dbb7e2
5 changed files with 75 additions and 14 deletions

View File

@@ -309,4 +309,16 @@ describe("micromark-extension-wiki-link", () => {
expect(serialized).toBe('<p><a href="/" class="internal">/index</a></p>');
});
});
describe("transclusions", () => {
test("parsers a transclusion as a regular wiki link", () => {
const serialized = micromark("![[Some Page]]", "ascii", {
extensions: [syntax()],
htmlExtensions: [html() as any], // TODO type fix
});
expect(serialized).toBe(
'<p><a href="Some Page" class="internal new transclusion">Some Page</a></p>'
);
});
});
});