board: a card turns over to a checklist, labels and a description

Enter on a card floats a sheet over the board: its labels, a markdown
description written in the vim editor (:w writes it to the card), and a
checklist walked with j/k, ticked with Space, grown with o. Labels take
their colour from their name. A repeating card comes back with its
checklist reopened.

Code in the editor and in rendered fences is coloured from nvim's
yorha.lua, one class per highlight group, for every language
@codemirror/language-data knows; the languages load on first use.
This commit is contained in:
nvrl committed 2026-10-21 23:53:24 +02:00
1 parent 1fd1aa1eb7
commit 3c4c383f72
24 files changed
+1274 -127

No files matched your search

+4 -1
View File
@@ -1,5 +1,6 @@
import DOMPurify from 'dompurify'
import { marked, type TokenizerAndRendererExtension } from 'marked'
import { highlighted } from './code.svelte'
import { mathEngine } from './math.svelte'
import { typeset } from './typst.svelte'
import { hardWrapped, titleHref } from './util'
@@ -94,7 +95,9 @@ marked.use({
code(token) {
if (token.lang === 'math') return tex(token.text, true)
if (token.lang === 'typst' || token.lang === 'typ') return typst(token.text)
return false
const html = token.lang ? highlighted(token.text, token.lang) : null
if (html === null) return false
return `<pre><code class="language-${escapeHtml(token.lang!.split(/\s/)[0])}">${html}</code></pre>\n`
},
},
})