fix: process overlapping cases in line folding only mode (3ab4fa62) (#588)

* fix: process overlapping cases in line folding only mode (3ab4fa62)

* fix: snapshot
This commit is contained in:
Myriad-Dreamin 2024-09-07 08:12:09 +08:00 committed by GitHub
parent 3ab4fa625f
commit 50fadf453f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 62 additions and 1 deletions

View file

@ -0,0 +1,7 @@
#let slides(..args) = args
#slides[
= Heading
][
]

View file

@ -0,0 +1,54 @@
---
source: crates/tinymist-query/src/folding_range.rs
expression: "JsonRepr::new_pure(json!({ \"false\": result_false, \"true\": result_true, }))"
input_file: crates/tinymist-query/src/fixtures/folding_range/nested-blocks-2.typ
---
{
"false": [
{
"collapsedText": "Heading",
"endCharacter": 11,
"endLine": 4,
"startCharacter": 4,
"startLine": 3
},
{
"collapsedText": "",
"endCharacter": 1,
"endLine": 4,
"startCharacter": 7,
"startLine": 1
},
{
"collapsedText": "",
"endCharacter": 1,
"endLine": 6,
"startCharacter": 1,
"startLine": 4
},
{
"collapsedText": "",
"endCharacter": 1,
"endLine": 6,
"startCharacter": 7,
"startLine": 1
}
],
"true": [
{
"collapsedText": "",
"endLine": 3,
"startLine": 2
},
{
"collapsedText": "",
"endLine": 6,
"startLine": 4
},
{
"collapsedText": "",
"endLine": 6,
"startLine": 1
}
]
}

View file

@ -385,7 +385,7 @@ fn e2e() {
}); });
let hash = replay_log(&tinymist_binary, &root.join("vscode")); let hash = replay_log(&tinymist_binary, &root.join("vscode"));
insta::assert_snapshot!(hash, @"siphash128_13:5e46fecd62a56ad654d933738ef4b753"); insta::assert_snapshot!(hash, @"siphash128_13:6b2341befebb4a33dc86f0d934aa43");
} }
} }