v2.52.0
This release comes with two major changes:
-
There is now an experimental math parser and formatter in Panache! The formatter
can be enabled via the following setting:[experimental] format-math = true
The formatter is very basic at the moment, only supporting alignment and
whitespace normalization, but the intent is for it to eventually support
operator-precedence-aware line breaking and other features. -
Panache now has its own YAML parser and formatter! We have previously relied
on the externalyaml_parserandpretty_yamlcrates. But with this release,
we have now shifted over to our own hand-crafted YAML parser and formatter,
fully compatible with the YAML 1.2 spec. YAML syntax is now also a first-class
citizen in the Panache CST, with all markers and trivia preserved, even in the
hashpipe YAML syntax for Quarto/R Markdown documents. The changes won't be
immediately visible to users, but will pave the way for better linting
and LSP features in the future.
Features
- parser: tokenize math operators into
MATH_OPERATOR(303e05b) - formatter: add experimental math content formatter (
a0e5f51) - linter: surface math diagnostics via
math-syntaxrule (20c0b5b) - parser: parse math content into a structural CST (
cfb0c45) - lsp: source YAML parse-error diagnostics from the parser channel (
ad2ec30) - parser: prefix-aware YAML scanner and builder (
66a8e99) - parser: swap YAML parser to our built-in parser (
4ed243a) - formatter: swap YAML formatting over to our own formatter (
9e722e5) - extensions: add
space_reference_linksextension (309739d) - extensions: add
wikilinks_title_after/before_pipe(49500f1) - parser: add syntax-error channel for embedded YAML (
523fb62) - parser: embed prefix-aware YAML under HASHPIPE_YAML_CONTENT (
d515896) - parser: drop host envelope from standalone YAML parse (
5fecc99) - inline YAML parser CST into Panache's CST (
d240130)
Bug Fixes
- formatter: preserve full code fence info string (
e9638be), closes #356 - linter: raise
math-syntaxdiagnostics to error (238a3de) - linter: catch stray
:::inside tight list items (d88856d), closes #333 - parser: don't strip blockquote markers in
<details>(4579dd8), closes #350 - formatter: align nested pipe tables to container indent (#346) (
1095aee) - parser: reject bare multi-word fence info in Pandoc (
395b000) - parser: peel line prefix after a hashpipe block scalar (
e246d30) - parser: don't start list at continuation for footnote def (
9494b14), closes #348 - parser: detect grid borders on dispatch line inside list items (
e7fa051) - parser: lift tables and fenced divs from list-item content (
6f3821c)
Performance Improvements
- lsp: run heavy lint reads on cloned salsa handle (
111f6cc) - linter: share one CST walk across built-in rules (
8569bbf) - lsp: debounce diagnostics, lint externally on save (
99310a5) - parser: gate table detection before whole-buffer strip (
f27fc80)
Dependencies
- updated crates/panache-formatter to v0.10.0
- updated crates/panache-parser to v0.15.0