refactoring van de cmap structuren bijna compleet

This commit is contained in:
2026-09-03 16:21:21 +02:00
parent 1abc84489f
commit bd1ef6bed0
75 changed files with 2547 additions and 1967 deletions
+7
View File
@@ -9,6 +9,7 @@ import {
expandTodoMarkup,
expandWikiMentions,
extractCmapEmbeds,
protectCamelCaseWikiWords,
restoreCmapEmbeds
} from "../static/js/wiki/markdown.js";
@@ -66,6 +67,12 @@ test("the WikiWord escape remains literal in protected Markdown", () => {
assert.equal(expandWikiMentions(markdown, [], [], []), markdown);
});
test("protects unprotected CamelCase WikiWords without changing Markdown syntax", () => {
const markdown = "HomeopathieWiki and [ExistingLink](https://example.test)\n`CodeWord`\n!AlreadyLiteral\n IndentedCodeWord";
assert.equal(protectCamelCaseWikiWords(markdown),
"!HomeopathieWiki and [ExistingLink](https://example.test)\n`CodeWord`\n!AlreadyLiteral\n IndentedCodeWord");
});
test("ambiguous CMap mentions are not resolved", () => {
const conceptMaps = [
{ slug: "first", title: "Zelfde Kaart" },