Skip to content

Commit 4e30a41

Browse files
committed
Correctly align printed information for debugging
Signed-off-by: Dimitar Dobrev <[email protected]>
1 parent c23bc89 commit 4e30a41

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

src/Generator/Generators/CodeGenerator.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -96,11 +96,8 @@ public virtual void GenerateDeclarationCommon(Declaration decl)
9696
public virtual void GenerateDebug(Declaration decl)
9797
{
9898
if (Options.GenerateDebugOutput && !string.IsNullOrWhiteSpace(decl.DebugText))
99-
{
100-
var debugText = decl.DebugText;
101-
debugText = Regex.Replace(debugText.Trim(), "\r?\n", "\n// DEBUG: ");
102-
WriteLine($"// DEBUG: {debugText}");
103-
}
99+
foreach (var line in Regex.Split(decl.DebugText.Trim(), "\r?\n"))
100+
WriteLine($"// DEBUG: {line}");
104101
}
105102

106103
#endregion

0 commit comments

Comments
 (0)