Update the browser, editor, settings, and installer

This commit is contained in:
Knotty Wyvern
2026-10-12 14:46:21 -07:00
parent 909894b9c8
commit f6eaa52949
163 changed files with 146260 additions and 534 deletions
+16
View File
@@ -0,0 +1,16 @@
import test from "node:test";
import assert from "node:assert/strict";
import { workspaceFileLink } from "../src/lib/editor/workspaceFileLink.ts";
import { wordAt } from "../src/lib/editor/spellingWord.ts";
test("file links resolve across nested folders and escape Markdown punctuation", () => {
assert.equal(workspaceFileLink("notes/deep/source.md", "docs/a [draft](1).pdf"), "[a \\[draft\\](1).pdf](../../docs/a%20%5Bdraft%5D%281%29.pdf)");
assert.equal(workspaceFileLink("notes/source.md", "notes/target.md"), "[target.md](target.md)");
assert.equal(workspaceFileLink("notes/source.md", "assets/pic.png"), "![](../assets/pic.png)");
});
test("spelling finds Unicode words and apostrophes without including punctuation", () => {
assert.deepEqual(wordAt("A naïve word.", 5), { word: "naïve", from: 2, to: 7 });
assert.equal(wordAt("Don't stop", 3)?.word, "Don't");
assert.equal(wordAt("word next", 5), null);
});