Inbox consideration

This commit is contained in:
Ian Gulliver
2026-10-15 20:20:02 -07:00
parent 35368242e3
commit 8d5ebe727a
13 changed files with 186 additions and 6 deletions
+9
View File
@@ -1,6 +1,7 @@
import { copyable, h } from "./dom.js";
import { diagram } from "./mermaid.js";
import { taskStyle } from "./taskcolor.js";
import { todoLink } from "./todolink.js";
type Block = HTMLElement;
@@ -315,6 +316,14 @@ function link(href: string, children: Node[]): Node {
if (task) {
return h("a", { href, class: "task-link", style: taskStyle(task[1]!) }, ...children);
}
const todo = /^#\/todo\/(\w+)\/(.+)$/.exec(href);
if (todo) {
try {
return todoLink(todo[1]!, decodeURIComponent(todo[2]!), children);
} catch {
return h("span", {}, ...children);
}
}
if (href.startsWith("#/")) {
return h("a", { href }, ...children);
}