Skip to content

Commit

Permalink
Removing hardcoded option value
Browse files Browse the repository at this point in the history
  • Loading branch information
alexgav committed Aug 20, 2024
1 parent ba00d25 commit 0291c12
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private IEnumerable<TextEdit> FormatRazor(FormattingContext context, RazorSyntax
{
// Disclaimer: CSharpCodeBlockSyntax is used a _lot_ in razor so these methods are probably
// being overly careful to only try to format syntax forms they care about.
TryFormatCSharpBlockStructure(context, edits, source, node, codeBlockBraceOnNextLine: true); // TODO
TryFormatCSharpBlockStructure(context, edits, source, node); // TODO
TryFormatSingleLineDirective(edits, source, node);
TryFormatBlocks(context, edits, source, node);
}
Expand Down Expand Up @@ -248,7 +248,7 @@ private static bool TryFormatHtmlInCSharp(FormattingContext context, IList<TextE
return false;
}

private void TryFormatCSharpBlockStructure(FormattingContext context, List<TextEdit> edits, RazorSourceDocument source, SyntaxNode node, bool codeBlockBraceOnNextLine)
private void TryFormatCSharpBlockStructure(FormattingContext context, List<TextEdit> edits, RazorSourceDocument source, SyntaxNode node)
{
// We're looking for a code block like this:
//
Expand All @@ -268,7 +268,7 @@ private void TryFormatCSharpBlockStructure(FormattingContext context, List<TextE
directive.DirectiveDescriptor?.Kind == DirectiveKind.CodeBlock)
{
// If we're formatting a @code or @functions directive, the user might have indicated they always want a newline
var forceNewLine = codeBlockBraceOnNextLine &&
var forceNewLine = CodeBlockBraceOnNextLine &&
directive.Body is RazorDirectiveBodySyntax { Keyword: { } keyword } &&
IsCodeOrFunctionsBlock(keyword);

Expand Down

0 comments on commit 0291c12

Please sign in to comment.