@lezer/markdown
Advanced tools
Comparing version 0.15.2 to 0.15.3
@@ -0,1 +1,7 @@ | ||
## 0.15.3 (2021-12-13) | ||
### Bug fixes | ||
Fix a bug where, if there were multiple extensions passed to the editor, the `wrap` option got dropped from the resulting configuration. | ||
## 0.15.2 (2021-11-08) | ||
@@ -2,0 +8,0 @@ |
{ | ||
"name": "@lezer/markdown", | ||
"version": "0.15.2", | ||
"version": "0.15.3", | ||
"description": "Incremental Markdown parser that consumes and emits Lezer trees", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs", |
@@ -231,2 +231,19 @@ import {Tree, TreeFragment} from "@lezer/common" | ||
}) | ||
it("can reuse nodes at the end of the document", () => { | ||
let doc = `* List item | ||
~~~js | ||
function foo() { | ||
return false | ||
} | ||
~~~ | ||
` | ||
let tree = parser.parse(doc) | ||
let ins = 11 | ||
let doc2 = doc.slice(0, ins) + "\n* " + doc.slice(ins) | ||
let fragments = TreeFragment.applyChanges(TreeFragment.addTree(tree), [{fromA: ins, toA: ins, fromB: ins, toB: ins + 3}]) | ||
let tree2 = parser.parse(doc2, fragments) | ||
ist(tree2.topNode.lastChild!.tree, tree.topNode.lastChild!.tree) | ||
}) | ||
}) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
369111
9110