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 Oct 20, 2023
1 parent 4e4bb4d commit 9ec4ff5
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 @@ -61,12 +61,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 9ec4ff5

Please sign in to comment.