We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c2b14bd commit ddc4eecCopy full SHA for ddc4eec
src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Extensions/SourceTextExtensions.cs
@@ -341,11 +341,12 @@ public static bool HasLFLineEndings(this SourceText text)
341
342
foreach (var line in text.Lines)
343
{
344
- if (line.EndIncludingLineBreak - line.End == 2)
+ var lineBreakLength = line.EndIncludingLineBreak - line.End;
345
+ if (lineBreakLength == 2)
346
347
crlfCount++;
348
}
- else if (line.EndIncludingLineBreak != line.End)
349
+ else if (lineBreakLength != 0)
350
351
lfCount++;
352
0 commit comments