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; }