Expand description
Colouring markdown source.
The one language this crate can classify without help: it already parses
markdown, and a source view needs colour on the platforms
crate::highlight cannot reach — tree-sitter is C, and a browser has no
libc to build it against.
Spans are painted into a per-byte map rather than pushed as they arrive, because markdown nests — a link inside a heading inside a quote — and the renderer needs them disjoint and in order. Inner events land last and win.
Constants§
- LANGUAGES
- The fence tags that mean “this is markdown”.
Functions§
- is_
markdown - Whether a fence tag names markdown.
- spans
- Colour
sourceas markdown, in bytes and in document order.