From 07a62871d0565d413fcd783d8538b65775e483ad Mon Sep 17 00:00:00 2001 From: Ajay Bhargav Baaskaran Date: Thu, 3 Jan 2019 15:58:48 -0800 Subject: [PATCH] Make whitespace in extensible directives be SpanKind.None (dotnet/aspnetcore-tooling#90) \n\nCommit migrated from https://github.com/dotnet/aspnetcore-tooling/commit/9035677e462dbb3ff766c00e870305f74fde8dfd --- .../src/Legacy/CSharpCodeParser.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/CSharpCodeParser.cs b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/CSharpCodeParser.cs index 44612ee18c..e63c1dbe90 100644 --- a/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/CSharpCodeParser.cs +++ b/src/Razor/Microsoft.AspNetCore.Razor.Language/src/Legacy/CSharpCodeParser.cs @@ -1356,7 +1356,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy case DirectiveKind.RazorBlock: AcceptWhile(IsSpacingToken(includeNewLines: true, includeComments: true)); SpanContext.EditHandler.AcceptedCharacters = AcceptedCharactersInternal.AllWhitespace; - directiveBuilder.Add(OutputAsMarkupLiteral()); + directiveBuilder.Add(OutputTokensAsUnclassifiedLiteral()); ParseDirectiveBlock(directiveBuilder, descriptor, parseChildren: (childBuilder, startingBraceLocation) => { @@ -1380,7 +1380,7 @@ namespace Microsoft.AspNetCore.Razor.Language.Legacy case DirectiveKind.CodeBlock: AcceptWhile(IsSpacingToken(includeNewLines: true, includeComments: true)); SpanContext.EditHandler.AcceptedCharacters = AcceptedCharactersInternal.AllWhitespace; - directiveBuilder.Add(OutputAsMarkupLiteral()); + directiveBuilder.Add(OutputTokensAsUnclassifiedLiteral()); ParseDirectiveBlock(directiveBuilder, descriptor, parseChildren: (childBuilder, startingBraceLocation) => {