Skip to content

Lima 0.8.0 — outline() for editors

Choose a tag to compare

@mkorun mkorun released this 05 Nov 17:56
· 5 commits to main since this release

Lima 0.8.0 adds outline() to the JavaScript package: where each key, comment and error of a document stands in the source, for editors.

Added

  • JavaScript: outline(input). Returns every key with its decoded name, its path, the span of the key as written and of its separator, every comment, and what a strict parse would report. Spans have a line, a column and an offset in UTF-16 code units, the shapes the Markanto parser uses. It reads with the parser's own readers, so Autor:in: x has the key Autor:in and the lines of a | scalar are no keys; it never throws for content, and a half-typed line leaves the keys below it in place. The first user is the block editor of hadley, which shows front matter as a striped table.

Rust and Go are unchanged; their version follows the repository's.

parse, parseCore and parseReferences are unchanged; benchmarks show no regression.