Skip to content

Commit c1bb25e

Browse files
committed
(minor) fix indentation in toObject function
This fixes a very minor aesthetic regression associated with newer protobuf versions protocolbuffers#196 Apparently the behavior of printer->Print has changed subtly in how it strips leading spaces.
1 parent 1976603 commit c1bb25e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

generator/js_generator.cc

+3-2
Original file line numberDiff line numberDiff line change
@@ -2216,10 +2216,11 @@ void Generator::GenerateClassToObject(const GeneratorOptions& options,
22162216
continue;
22172217
}
22182218

2219+
auto indent = printer->WithIndent(4);
22192220
if (!first) {
2220-
printer->Print(",\n ");
2221+
printer->Emit(",\n");
22212222
} else {
2222-
printer->Print("\n ");
2223+
printer->Emit("\n");
22232224
first = false;
22242225
}
22252226

0 commit comments

Comments
 (0)