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
+10
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";
const choiceMarker = /^(\([ *]\)|\[[ xX]\])\s+(\S.*?)\s*$/;
const detailsOpen = /^\s*<details>\s*(?:<summary>(.*?)<\/summary>)?\s*$/i;
const summaryLine = /^\s*<summary>(.*?)<\/summary>\s*$/i;
@@ -275,6 +276,15 @@ function link(href, children) {
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);
}