diff --git a/src/emitterutils.cpp b/src/emitterutils.cpp index 0113c45..c6ad5e5 100644 --- a/src/emitterutils.cpp +++ b/src/emitterutils.cpp @@ -366,13 +366,13 @@ bool WriteDoubleQuotedString(ostream_wrapper& out, const std::string& str, bool WriteLiteralString(ostream_wrapper& out, const std::string& str, std::size_t indent) { out << "|\n"; - out << IndentTo(indent); int codePoint; for (std::string::const_iterator i = str.begin(); GetNextCodePointAndAdvance(codePoint, i, str.end());) { if (codePoint == '\n') { - out << "\n" << IndentTo(indent); + out << "\n"; } else { + out<< IndentTo(indent); WriteCodePoint(out, codePoint); } }