From 6ba4dbeae4617e2644d3a5128572c575cf590128 Mon Sep 17 00:00:00 2001 From: uniqueiniquity Date: Fri, 23 Mar 2018 14:28:07 -0700 Subject: [PATCH] Make region outlining more sensitive to CRLF --- src/services/outliningElementsCollector.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/outliningElementsCollector.ts b/src/services/outliningElementsCollector.ts index f3f91724a9c..90c53d47561 100644 --- a/src/services/outliningElementsCollector.ts +++ b/src/services/outliningElementsCollector.ts @@ -33,7 +33,7 @@ namespace ts.OutliningElementsCollector { const currentLineStart = lineStarts[i]; const lineEnd = i + 1 === lineStarts.length ? sourceFile.getEnd() : lineStarts[i + 1] - 1; const lineText = sourceFile.text.substring(currentLineStart, lineEnd); - const result = lineText.match(/^\s*\/\/\s*#(end)?region(?:\s+(.*))?$/); + const result = lineText.match(/^\s*\/\/\s*#(end)?region(?:\s+(.*))?(?:\r)?$/); if (!result || isInComment(sourceFile, currentLineStart)) { continue; }