Skip to content

Commit b7db7ab

Browse files
authored
Merge branch 'main' into service-specific-client-interceptors
2 parents 296c825 + c41e0a7 commit b7db7ab

12 files changed

+381
-394
lines changed

Sources/GRPCCodeGen/CodeGenerationRequest.swift

Lines changed: 218 additions & 218 deletions
Large diffs are not rendered by default.

Sources/GRPCCodeGen/Internal/Renderer/TextBasedRenderer.swift

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ final class StringCodeWriter {
7070
if nextWriteAppendsToLastLine && !lines.isEmpty {
7171
let existingLine = lines.removeLast()
7272
newLine = existingLine + line
73+
} else if line.isEmpty {
74+
// Skip indentation to avoid trailing whitespace on blank lines.
75+
newLine = line
7376
} else {
7477
let indentation = Array(repeating: " ", count: self.indentation * level).joined()
7578
newLine = indentation + line

0 commit comments

Comments
 (0)