Skip to main content

Crate knot_editor_host

Crate knot_editor_host 

Source
Expand description

Host-side reuse-lexers for the knot editor.

The portable illume crate stays lean (jotdown + logos). This crate is the precision layer: InjectionLexer implementations that reuse a parser the app already ships, registered as overrides on the portable pack. They are optional precision over the always-present logos floor, so highlighting never depends on one of these parsers being compiled in.

Today: Markdown via pulldown_cmark. To follow, each over its existing host tokenizer: CSS (cssparser), HTML (html5ever), precise JS (boa_parser), Turtle/RDF (oxttl). full_pack returns the portable pack plus the reuse overrides registered here.

Re-exports§

pub use editor::KnotReadout;

Modules§

editor
The knot readout: derives the editor’s views of a knot from its source text.

Structs§

EditOutcome
What changed when one platform-neutral command was applied.
KnotEditor
A retained Knot source buffer and its derived readout.
MarkdownLexer
CommonMark / Markdown highlighter, reusing pulldown_cmark’s offset-iter event stream (the same shape jotdown gives the djot highlighter). Each colored construct emits one span from its Start to its End.

Functions§

full_pack
The portable pack plus the host reuse-lexers registered in this crate. The host calls this to get the full editor injection registry; mods register on top.