Skip to content

Commit

Permalink
Keep new lines before unsafe statements
Browse files Browse the repository at this point in the history
closes #917
  • Loading branch information
belav committed Jun 24, 2023
1 parent 0a82045 commit 4c32fd1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@ class ClassName
{
int* p = null;
}

unsafe
{
// should keep newline above this one
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ internal static class UnsafeStatement
public static Doc Print(UnsafeStatementSyntax node, FormattingContext context)
{
return Doc.Concat(
ExtraNewLines.Print(node),
Token.Print(node.UnsafeKeyword, context),
Node.Print(node.Block, context)
);
Expand Down

0 comments on commit 4c32fd1

Please sign in to comment.