mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-08-30 23:27:24 +00:00
fold curly blocks
This commit is contained in:
parent
8d7e8a175e
commit
23b040962f
3 changed files with 30 additions and 18 deletions
|
@ -98,6 +98,7 @@ pub fn extract_ranges(mut text: &str, tag: &str) -> (Vec<TextRange>, String) {
|
|||
}
|
||||
}
|
||||
assert!(stack.is_empty(), "unmatched <{}>", tag);
|
||||
ranges.sort_by_key(|r| (r.start(), r.end()));
|
||||
(ranges, res)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue