Update editor, themes, menus, backgrounds, and release tooling

This commit is contained in:
Knotty Wyvern
2026-10-14 16:19:51 -07:00
parent f6eaa52949
commit edef2520af
113 changed files with 5722 additions and 386 deletions
+30
View File
@@ -0,0 +1,30 @@
import { test } from "node:test";
import assert from "node:assert/strict";
import { documentLinks } from "../src/lib/editor/documentLinks.ts";
import { tableLinkLabelPosition } from "../src/lib/editor/tableLinkSource.ts";
test("table link reveal retains the clicked character through Markdown label marks", () => {
for (const [source, offset, prefix] of [
["[Roadmap](docs/roadmap.md)", 5, "[Roadm"],
['**Prefix** [One](same.md) + [Sec**ond**](same.md "Title")', 4, '**Prefix** [One](same.md) + [Sec**o'],
["[A \\*star](note.md)", 3, "[A \\*"],
["[Use `code`](note.md)", 5, "[Use `c"],
["<https://example.org>", 8, "<https://"],
] as const) {
const link = documentLinks(source).at(-1)!;
assert.equal(source.slice(0, tableLinkLabelPosition(source, link, offset)), prefix);
}
});
test("table wiki links retain literal label text, aliases, spaces, and escaped pipes", () => {
for (const [source, offset, prefix] of [
["[[guide\\|Guide]]", 3, "[[guide\\|Gui"],
["[[guide\\|**Alias**]]", 2, "[[guide\\|**"],
["[[ Guide ]]", 3, "[[ G"],
["[[Guide\\|]]", 2, "[[Gu"],
["[[guide\\|A\\|B]]", 2, "[[guide\\|A\\|"],
] as const) {
const link = documentLinks(source)[0];
assert.equal(source.slice(0, tableLinkLabelPosition(source, link, offset)), prefix);
}
});