Plain texts: clickable links, *bold*, /italic/ and quotes #122

Merged
littlefox merged 2 commits from issue-106-formatting into main 2026-10-18 18:30:35 +00:00
Owner

Closes #106

  • kom_client::markup: http(s) URLs (trailing punctuation and unmatched ) left out), *bold* and /italic/ at word boundaries only (paths, fractions, bullets, arithmetic stay plain), > quote lines with depth.
  • Rendering: links open in a new tab with noopener noreferrer nofollow (and don't select the thread card around them); markers kept but dimmed, so the text is exactly what was written; quotes get a bar. No link previews.
  • Seed: one text with every case in "Formatering", which only Tove follows (added last, no numbers move).

Verified: parser unit tests (links, emphasis, the cases that must stay plain, quotes), new format.spec.ts on desktop/Android/iPhone (links and their attributes, bold/italic, quotes, and the body's text equal to the original), full e2e 181/181, clippy native/wasm/desktop clean. Looked at the screenshot: the test container's monospace font has no bold face (subject lines look regular too), so bold shows in real browsers with DejaVu Sans Mono.

🤖 Generated with Claude Code

https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8

Closes #106 - `kom_client::markup`: http(s) URLs (trailing punctuation and unmatched `)` left out), `*bold*` and `/italic/` at word boundaries only (paths, fractions, bullets, arithmetic stay plain), `>` quote lines with depth. - Rendering: links open in a new tab with `noopener noreferrer nofollow` (and don't select the thread card around them); markers kept but dimmed, so the text is exactly what was written; quotes get a bar. No link previews. - Seed: one text with every case in "Formatering", which only Tove follows (added last, no numbers move). Verified: parser unit tests (links, emphasis, the cases that must stay plain, quotes), new `format.spec.ts` on desktop/Android/iPhone (links and their attributes, bold/italic, quotes, and the body's text equal to the original), full e2e 181/181, clippy native/wasm/desktop clean. Looked at the screenshot: the test container's monospace font has no bold face (subject lines look regular too), so bold shows in real browsers with DejaVu Sans Mono. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
URLs in plain texts were plain text. kom_client::markup finds http(s)
links and the conventions people already type, at word boundaries only so
paths, fractions and bullets stay as they are. The markers stay in the
text, dimmed, so copying or quoting gives back what was written and the
server text stays plain. Quote lines get a bar.

Refs #106

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01XJW2ocwLunyaLiUwCBHEP8
Merge remote-tracking branch 'origin/main' into issue-106-formatting
All checks were successful
ci / check (push) Successful in 11m40s
ci / desktop (push) Successful in 16m17s
ci / e2e (push) Successful in 22m31s
1167938e0a
littlefox referenced this pull request from a commit 2026-10-19 05:23:03 +00:00
Sign in to join this conversation.
No description provided.