@codemirror/language
Advanced tools
Changelog
6.4.0 (2023-01-12)
The bracketMatchingHandle
node prop can now be used to limit bracket matching behavior for larger nodes to a single subnode (for example the tag name of an HTML tag).
Changelog
6.3.2 (2022-12-16)
Fix a bug that caused ensureSyntaxTree
to return incomplete trees when using a viewport-aware parser like StreamLanguage
.
Changelog
6.3.1 (2022-11-14)
Make syntax-based folding include syntax nodes that start right at the end of a line as potential fold targets.
Fix the indentService
protocol to allow a distinction between declining to handle the indentation and returning null to indicate the line has no definite indentation.
Changelog
6.3.0 (2022-10-24)
HighlightStyle
objects now have a specs
property holding the tag styles that were used to define them.
Language
objects now have a name
field holding the language name.
Changelog
6.2.1 (2022-07-21)
Fix a bug where bracketMatching
would incorrectly match nested brackets in syntax trees that put multiple pairs of brackets in the same parent node.
Fix a bug that could cause indentRange
to loop infinitely.
Changelog
6.2.0 (2022-06-30)
Fix a bug that prevented bracket matching to recognize plain brackets inside a language parsed as an overlay.
The indentRange
function provides an easy way to programatically auto-indent a range of the document.
Changelog
6.1.0 (2022-06-20)
The foldState
field is now public, and can be used to serialize and deserialize the fold state.
Changelog
6.0.0 (2022-06-08)
The foldingChanged
option to foldGutter
can now be used to trigger a recomputation of the fold markers.