Skip to content

Commit

Permalink
This isn't correct, but I wanna see what 3rd party code does
Browse files Browse the repository at this point in the history
closes #975
  • Loading branch information
belav committed Dec 24, 2023
1 parent 74d4525 commit a629f20
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Src/CSharpier/SyntaxPrinter/Token.cs
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,16 @@ is InterpolatedStringExpressionSyntax
{ RawKind: (int)SyntaxKind.InterpolatedVerbatimStringStartToken }
}
)
|| syntaxToken.RawSyntaxKind() is SyntaxKind.MultiLineRawStringLiteralToken
)
{
var lines = syntaxToken.Text.Replace("\r", string.Empty).Split(new[] { '\n' });
var lines = syntaxToken.Text.Replace("\r", string.Empty).Split('\n');
docs.Add(Doc.Join(Doc.LiteralLine, lines.Select(o => new StringDoc(o))));
}
else if (syntaxToken.RawSyntaxKind() is SyntaxKind.MultiLineRawStringLiteralToken)
{
var lines = syntaxToken.Text.Replace("\r", string.Empty).Split('\n');
docs.Add(Doc.Join(Doc.HardLine, lines.Select(o => new StringDoc(o.TrimStart()))));
}
else
{
docs.Add(syntaxToken.Text);
Expand Down

0 comments on commit a629f20

Please sign in to comment.