fold curly blocks

This commit is contained in:
Aleksey Kladov 2018-12-20 22:13:16 +03:00
parent 8d7e8a175e
commit 23b040962f
3 changed files with 30 additions and 18 deletions

View file

@ -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)
}