Diffdown is a real-time collaborative Markdown editor/previewer built on the AT Protocol diffdown.com
1## 6.12.2 (2026-02-25) 2 3### Bug fixes 4 5Make sure brackets are highlighted in the initial editor state. 6 7Pause bracket matching updates during composition, to avoid disrupting Mobile Safari's fragile composition handling. 8 9## 6.12.1 (2025-12-22) 10 11### Bug fixes 12 13Improve finding inner language in syntax tree when the nested parse has been marked as bracketed. 14 15## 6.11.3 (2025-08-15) 16 17### Bug fixes 18 19Make the stream parser user 4 times smaller chunks to reduce the amount of re-parsed code on changes. 20 21## 6.11.2 (2025-06-27) 22 23### Bug fixes 24 25Make sure folded ranges open when backspacing or deleting into them. 26 27## 6.11.1 (2025-06-02) 28 29### Bug fixes 30 31Fix an issue where indentation would sometimes miss nodes in mixed-language situations. 32 33## 6.11.0 (2025-03-13) 34 35### New features 36 37Stream parsers now support a `mergeTokens` option that can be used to turn off automatic merging of adjacent tokens. 38 39## 6.10.8 (2024-12-23) 40 41### Bug fixes 42 43Fix a regression introduced 6.10.7 that caused indention to sometimes crash on nested language boundaries. 44 45## 6.10.7 (2024-12-17) 46 47### Bug fixes 48 49Fix an issue where indentation for a stream language would fail to work when the parse covered only part of the document, far from the start. 50 51Make sure the inner mode gets a chance to indent when indenting right at the end of a nested language section. 52 53## 6.10.6 (2024-11-29) 54 55### Bug fixes 56 57Fix a crash in `StreamLanguage` when the input range is entirely before the editor viewport. 58 59## 6.10.5 (2024-11-27) 60 61### Bug fixes 62 63Fix an issue where a `StreamLanguage` could get confused when trying to reuse existing parse data when the parsed range changed. 64 65## 6.10.4 (2024-11-24) 66 67### Bug fixes 68 69Join adjacent tokens of the same type into a single token in . 70 71Call stream language indent functions even when the language is used as a nested parser. 72 73Fix a crash in `StreamParser` when a parse was resumed with different input ranges. 74 75## 6.10.3 (2024-09-19) 76 77### Bug fixes 78 79Fix a TypeScript error when using `HighlightStyle` with the `exactOptionalPropertyTypes` typechecking option enabled. 80 81Make `delimitedIndent` align to spaces after the opening token. 82 83## 6.10.2 (2024-06-03) 84 85### Bug fixes 86 87Fix an infinite loop that could occur when enabling `bidiIsolates` in documents with both bidirectional text and very long lines. 88 89## 6.10.1 (2024-02-02) 90 91### Bug fixes 92 93Fix an issue where, when a lot of code is visible in the initial editor, the bottom bit of code is shown without highlighting for one frame. 94 95## 6.10.0 (2023-12-28) 96 97### New features 98 99The new `bidiIsolates` extension can be used to wrap syntactic elements where this is appropriate in an element that isolates their text direction, avoiding weird ordering of neutral characters on direction boundaries. 100 101## 6.9.3 (2023-11-27) 102 103### Bug fixes 104 105Fix an issue in `StreamLanguage` where it ran out of node type ids if you repeatedly redefined a language with the same token table. 106 107## 6.9.2 (2023-10-24) 108 109### Bug fixes 110 111Allow `StreamParser` tokens get multiple highlighting tags. 112 113## 6.9.1 (2023-09-20) 114 115### Bug fixes 116 117Indentation now works a lot better in mixed-language documents that interleave the languages in a complex way. 118 119Code folding is now able to pick the right foldable syntax node when the line end falls in a mixed-parsing language that doesn't match the target node. 120 121## 6.9.0 (2023-08-16) 122 123### Bug fixes 124 125Make `getIndentation` return null, rather than 0, when there is no syntax tree available. 126 127### New features 128 129The new `preparePlaceholder` option to `codeFolding` makes it possible to display contextual information in a folded range placeholder widget. 130 131## 6.8.0 (2023-06-12) 132 133### New features 134 135The new `baseIndentFor` method in `TreeIndentContext` can be used to find the base indentation for an arbitrary node. 136 137## 6.7.0 (2023-05-19) 138 139### New features 140 141Export `DocInput` class for feeding editor documents to a Lezer parser. 142 143## 6.6.0 (2023-02-13) 144 145### New features 146 147Syntax-driven language data queries now support sublanguages, which make it possible to return different data for specific parts of the tree produced by a single language. 148 149## 6.5.0 (2023-02-07) 150 151### Bug fixes 152 153Make indentation for stream languages more reliable by having `StringStream.indentation` return overridden indentations from the indent context. 154 155### New features 156 157The `toggleFold` command folds or unfolds depending on whether there's an existing folded range on the current line. 158 159`indentUnit` now accepts any (repeated) whitespace character, not just spaces and tabs. 160 161## 6.4.0 (2023-01-12) 162 163### New features 164 165The `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). 166 167## 6.3.2 (2022-12-16) 168 169### Bug fixes 170 171Fix a bug that caused `ensureSyntaxTree` to return incomplete trees when using a viewport-aware parser like `StreamLanguage`. 172 173## 6.3.1 (2022-11-14) 174 175### Bug fixes 176 177Make syntax-based folding include syntax nodes that start right at the end of a line as potential fold targets. 178 179Fix the `indentService` protocol to allow a distinction between declining to handle the indentation and returning null to indicate the line has no definite indentation. 180 181## 6.3.0 (2022-10-24) 182 183### New features 184 185`HighlightStyle` objects now have a `specs` property holding the tag styles that were used to define them. 186 187`Language` objects now have a `name` field holding the language name. 188 189## 6.2.1 (2022-07-21) 190 191### Bug fixes 192 193Fix a bug where `bracketMatching` would incorrectly match nested brackets in syntax trees that put multiple pairs of brackets in the same parent node. 194 195Fix a bug that could cause `indentRange` to loop infinitely. 196 197## 6.2.0 (2022-06-30) 198 199### Bug fixes 200 201Fix a bug that prevented bracket matching to recognize plain brackets inside a language parsed as an overlay. 202 203### New features 204 205The `indentRange` function provides an easy way to programatically auto-indent a range of the document. 206 207## 6.1.0 (2022-06-20) 208 209### New features 210 211The `foldState` field is now public, and can be used to serialize and deserialize the fold state. 212 213## 6.0.0 (2022-06-08) 214 215### New features 216 217The `foldingChanged` option to `foldGutter` can now be used to trigger a recomputation of the fold markers. 218 219## 0.20.2 (2022-05-20) 220 221### Bug fixes 222 223List style-mod as a dependency. 224 225## 0.20.1 (2022-05-18) 226 227### Bug fixes 228 229Make sure `all` styles in the CSS generated for a `HighlightStyle` have a lower precedence than the other rules defined for the style. Use a shorthand property 230 231## 0.20.0 (2022-04-20) 232 233### Breaking changes 234 235`HighlightStyle.get` is now called `highlightingFor`. 236 237`HighlightStyles` no longer function as extensions (to improve tree shaking), and must be wrapped with `syntaxHighlighting` to add to an editor configuration. 238 239`Language` objects no longer have a `topNode` property. 240 241### New features 242 243`HighlightStyle` and `defaultHighlightStyle` from the now-removed @codemirror/highlight package now live in this package. 244 245The new `forceParsing` function can be used to run the parser forward on an editor view. 246 247The exports that used to live in @codemirror/matchbrackets are now exported from this package. 248 249The @codemirror/fold package has been merged into this one. 250 251The exports from the old @codemirror/stream-parser package now live in this package. 252 253## 0.19.10 (2022-03-31) 254 255### Bug fixes 256 257Autocompletion may now also trigger automatic indentation on input. 258 259## 0.19.9 (2022-03-30) 260 261### Bug fixes 262 263Make sure nodes that end at the end of a partial parse aren't treated as valid fold targets. 264 265Fix an issue where the parser sometimes wouldn't reuse parsing work done in the background on transactions. 266 267## 0.19.8 (2022-03-03) 268 269### Bug fixes 270 271Fix an issue that could cause indentation logic to use the wrong line content when indenting multiple lines at once. 272 273## 0.19.7 (2021-12-02) 274 275### Bug fixes 276 277Fix an issue where the parse worker could incorrectly stop working when the parse tree has skipped gaps in it. 278 279## 0.19.6 (2021-11-26) 280 281### Bug fixes 282 283Fixes an issue where the background parse work would be scheduled too aggressively, degrading responsiveness on a newly-created editor with a large document. 284 285Improve initial highlight for mixed-language editors and limit the amount of parsing done on state creation for faster startup. 286 287## 0.19.5 (2021-11-17) 288 289### New features 290 291The new function `syntaxTreeAvailable` can be used to check if a fully-parsed syntax tree is available up to a given document position. 292 293The module now exports `syntaxParserRunning`, which tells you whether the background parser is still planning to do more work for a given editor view. 294 295## 0.19.4 (2021-11-13) 296 297### New features 298 299`LanguageDescription.of` now takes an optional already-loaded extension. 300 301## 0.19.3 (2021-09-13) 302 303### Bug fixes 304 305Fix an issue where a parse that skipped content with `skipUntilInView` would in some cases not be restarted when the range came into view. 306 307## 0.19.2 (2021-08-11) 308 309### Bug fixes 310 311Fix a bug that caused `indentOnInput` to fire for the wrong kinds of transactions. 312 313Fix a bug that could cause `indentOnInput` to apply its changes incorrectly. 314 315## 0.19.1 (2021-08-11) 316 317### Bug fixes 318 319Fix incorrect versions for @lezer dependencies. 320 321## 0.19.0 (2021-08-11) 322 323### Breaking changes 324 325CodeMirror now uses lezer 0.15, which means different package names (scoped with @lezer) and some breaking changes in the library. 326 327`EditorParseContext` is now called `ParseContext`. It is no longer passed to parsers, but must be retrieved with `ParseContext.get`. 328 329`IndentContext.lineIndent` now takes a position, not a `Line` object, as argument. 330 331`LezerLanguage` was renamed to `LRLanguage` (because all languages must emit Lezer-style trees, the name was misleading). 332 333`Language.parseString` no longer exists. You can just call `.parser.parse(...)` instead. 334 335### New features 336 337New `IndentContext.lineAt` method to access lines in a way that is aware of simulated line breaks. 338 339`IndentContext` now provides a `simulatedBreak` property through which client code can query whether the context has a simulated line break. 340 341## 0.18.2 (2021-06-01) 342 343### Bug fixes 344 345Fix an issue where asynchronous re-parsing (with dynamically loaded languages) sometimes failed to fully happen. 346 347## 0.18.1 (2021-03-31) 348 349### Breaking changes 350 351`EditorParseContext.getSkippingParser` now replaces `EditorParseContext.skippingParser` and allows you to provide a promise that'll cause parsing to start again. (The old property remains available until the next major release.) 352 353### Bug fixes 354 355Fix an issue where nested parsers could see past the end of the nested region. 356 357## 0.18.0 (2021-03-03) 358 359### Breaking changes 360 361Update dependencies to 0.18. 362 363### Breaking changes 364 365The `Language` constructor takes an additional argument that provides the top node type. 366 367### New features 368 369`Language` instances now have a `topNode` property giving their top node type. 370 371`TreeIndentContext` now has a `continue` method that allows an indenter to defer to the indentation of the parent nodes. 372 373## 0.17.5 (2021-02-19) 374 375### New features 376 377This package now exports a `foldInside` helper function, a fold function that should work for most delimited node types. 378 379## 0.17.4 (2021-01-15) 380 381## 0.17.3 (2021-01-15) 382 383### Bug fixes 384 385Parse scheduling has been improved to reduce the likelyhood of the user looking at unparsed code in big documents. 386 387Prevent parser from running too far past the current viewport in huge documents. 388 389## 0.17.2 (2021-01-06) 390 391### New features 392 393The package now also exports a CommonJS module. 394 395## 0.17.1 (2020-12-30) 396 397### Bug fixes 398 399Fix a bug where changing the editor configuration wouldn't update the language parser used. 400 401## 0.17.0 (2020-12-29) 402 403### Breaking changes 404 405First numbered release. 406