mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-15 20:25:23 -06:00
Ensure returned spans are ordered by start
This commit is contained in:
parent
562d988614
commit
fb462c91a4
@ -13,7 +13,7 @@ namespace ts.OutliningElementsCollector {
|
||||
|
||||
walk(sourceFile);
|
||||
gatherRegions();
|
||||
return elements;
|
||||
return elements.sort((span1, span2) => span1.textSpan.start - span2.textSpan.start);
|
||||
|
||||
/** If useFullStart is true, then the collapsing span includes leading whitespace, including linebreaks. */
|
||||
function addOutliningSpan(hintSpanNode: Node, startElement: Node, endElement: Node, autoCollapse: boolean, useFullStart: boolean) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user