Annotate Wikipedia articles with the same keys as nodes

An article's text is drawn from its sanitised HTML as selectable text
(articleText.ts): paragraphs, list items and quotes with their inline
elements; a formula is one unit; tables and preformatted blocks are shown
but carry no offsets. The selection ladder, Tab, Enter, e d y x c :, D and
the rest go through the same store paths as on a node; a note on article
words is a note (Enter steps into it; c, f, u, the editor and history work
on it as on any other) and shows wherever the article is opened, in the
library's own note style. Detached annotations are listed at the top of
their section with a link to the old revision. Keys that only make sense on
a node say why in the status line. Tab on a link now selects its words, so
Esc widens before h leaves, as in a node.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014yB6q4BHMwptTX3YFtkRab
This commit is contained in:
thalladaandClaude Opus 5.5 committed 2026-11-15 21:53:00 -05:00
1 parent f63fc10dc0
commit 2c1ee048a4
18 files changed
+1134 -126

No files matched your search

+11
View File
@@ -505,6 +505,17 @@ kbd, .help code { font-family: var(--mono); font-size: 0.86em; border: 1px solid
.wiki-text blockquote { margin: 0.4em 0 0.7em 1em; padding-left: 0.7em; border-left: 2px solid var(--wiki-rule); }
.wiki-text pre, .wiki-text code { font-family: var(--mono); font-size: 0.9em; }
.wiki-text math { font-size: 1.05em; }
/* Annotations in an article are the library's own notes: its dotted underline, its serif face, set off from Wikipedia's text. */
.wiki-text .gloss, .wiki-text .inset, .wdetached .inset { font-family: var(--serif); text-align: left; }
.wiki-text .gloss { color: var(--fg); font-size: 0.98em; }
.wiki-text .inset, .wdetached .inset { display: block; margin: 0.35rem 0 0.75rem 1.2em; padding: 0.35rem 0.75rem; font-size: 0.86rem; line-height: 1.45; background: var(--bg); color: var(--fg); border-left: 2px dotted var(--faint); }
.wiki-text .inset.focused, .wdetached .inset.focused { border-left: 2px solid var(--fg); }
.wiki-text .gloss.focused { background: var(--sel); }
.wdetached { margin: 0 0 0.6rem; }
.wdetached .inset { margin-left: 0; border-left: 2px dashed var(--attn); }
.wdetached .meta { color: var(--attn); text-transform: none; letter-spacing: 0.02em; font-size: 0.66rem; }
.wdetached .meta a { color: inherit; text-decoration: underline 1px dotted; text-underline-offset: 0.15em; }
.wiki-text .wmath.sel { outline: 1px solid var(--sel-strong); }
.wiki-desc { margin: -0.4rem 0 0.6rem; font-size: 0.74rem; color: var(--dim); font-style: italic; }
.wiki-summary { margin: 0 0 0.5rem; font-size: 0.82rem; line-height: 1.55; }
.wiki-more, .wiki-wait, .wiki-back { margin: 0.3rem 0; font-size: 0.66rem; color: var(--faint); letter-spacing: 0.02em; }