refactoring of cmaps, widgets, etc.

This commit is contained in:
2026-09-02 16:06:26 +02:00
parent 38f255c1a4
commit f0562a06cc
52 changed files with 3626 additions and 2642 deletions
+17
View File
@@ -49,6 +49,23 @@ test("WikiWords use page and CMap catalogues without expanding protected text",
"[Homeopathie Wiki](#/homeopathie) en [Architectuur Kaart](#cmap/architectuur), maar `NieuwePagina` niet.");
});
test("an exclamation mark renders a WikiWord literally without becoming visible", () => {
const pages = [
{ slug: "homeopathie", namespace: "", pageSlug: "homeopathie", title: "Homeopathie Wiki" }
];
const conceptMaps = [{ slug: "architectuur", title: "Architectuur Kaart" }];
const markdown = "!HomeopathieWiki en !NieuwePagina en !cmap:ArchitectuurKaart.";
const expanded = expandWikiMentions(markdown, pages, [], conceptMaps);
assert.equal(expanded,
"HomeopathieWiki en NieuwePagina en cmap:ArchitectuurKaart.");
assert.equal(expandWikiMentions(expanded, pages, [], conceptMaps), expanded);
});
test("the WikiWord escape remains literal in protected Markdown", () => {
const markdown = "`!NieuwePagina` en [!NieuwePagina](https://example.com)";
assert.equal(expandWikiMentions(markdown, [], [], []), markdown);
});
test("ambiguous CMap mentions are not resolved", () => {
const conceptMaps = [
{ slug: "first", title: "Zelfde Kaart" },