small changes
This commit is contained in:
@@ -9,6 +9,7 @@ import {
|
||||
expandTodoMarkup,
|
||||
expandWikiMentions,
|
||||
extractCmapEmbeds,
|
||||
normalizeMarkdownLinkDestinations,
|
||||
protectCamelCaseWikiWords,
|
||||
restoreCmapEmbeds
|
||||
} from "../static/js/wiki/markdown.js";
|
||||
@@ -39,6 +40,13 @@ test("explicit namespaced links become internal routes outside code", () => {
|
||||
"[Page](#/notes%3Aroadmap)\n[CMap](#cmap/architecture)\n```\n[Code](notes:keep)\n```");
|
||||
});
|
||||
|
||||
test("link destinations with spaces are encoded without changing code", () => {
|
||||
const markdown = "* [DOC](/uploads/review-zuidas-2026:appreciatie/1788796826-35348-Review ZuidasDok - Hans Dijkema - Beschouwing v3.docx)\n`[code](/uploads/page/file name.txt)`\n```\n[code](/uploads/page/file name.txt)\n```";
|
||||
assert.equal(
|
||||
normalizeMarkdownLinkDestinations(markdown),
|
||||
"* [DOC](/uploads/review-zuidas-2026:appreciatie/1788796826-35348-Review%20ZuidasDok%20-%20Hans%20Dijkema%20-%20Beschouwing%20v3.docx)\n`[code](/uploads/page/file name.txt)`\n```\n[code](/uploads/page/file name.txt)\n```");
|
||||
});
|
||||
|
||||
test("WikiWords use page and CMap catalogues without expanding protected text", () => {
|
||||
const pages = [
|
||||
{ slug: "homeopathie", namespace: "", pageSlug: "homeopathie", title: "Homeopathie Wiki" }
|
||||
|
||||
Reference in New Issue
Block a user