Colour markdown's tables and the addresses written in it

A table is recognised by its delimiter row, the only line of one that cannot
be anything else, and its header is the line above -- the single place the
scanner looks ahead. Colouring every `|` instead would have marked the pipes
of a shell command written in a paragraph.

Addresses come in two shapes: `<...>` needs a scheme's colon or an at sign
inside it and no whitespace, which leaves `<div>` alone; a bare `scheme://`
needs no closer, so where it ends is the decision -- the sentence's trailing
punctuation is given back, and so is a closing bracket unless one opened
inside the URL.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
irisandClaude Opus 5 committed 2026-09-04 10:47:18 -04:00
1 parent 68c5180260
commit 7997eeb7f8
4 files changed
+238 -8

No files matched your search

+7
View File
@@ -285,6 +285,13 @@ Not emphasis: a * b * c, and snake_case_name.
> quoted
| column | what it holds |
|--------|---------------|
| one | a value |
A link <https://example.com> and a bare https://example.com/a., but run a | b
in a paragraph has no table in it.
```rust
fn main() { println!("hello"); }
```