Skip to content

Commit e3ddd05

Browse files
committed
Don't format the start of implicit expressions
1 parent ca85e01 commit e3ddd05

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/Razor/src/Microsoft.CodeAnalysis.Razor.Workspaces/Formatting/Passes/CSharpOnTypeFormattingPass.cs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -339,7 +339,14 @@ private static void CleanupSourceMappingStart(FormattingContext context, LinePos
339339

340340
var text = context.SourceText;
341341
var sourceMappingSpan = text.GetTextSpan(sourceMappingRange);
342-
if (!ShouldFormat(context, sourceMappingSpan, allowImplicitStatements: false, out var owner))
342+
if (!ShouldFormat(context,
343+
sourceMappingSpan,
344+
new ShouldFormatOptions(
345+
AllowImplicitStatements: false,
346+
AllowImplicitExpressions: false,
347+
AllowSingleLineExplicitExpressions: true,
348+
IsLineRequest: false),
349+
out var owner))
343350
{
344351
// We don't want to run cleanup on this range.
345352
return;

0 commit comments

Comments
 (0)