diff --git a/src/lib_json/json_reader.cpp b/src/lib_json/json_reader.cpp index 36e4c4c..c6a35bf 100644 --- a/src/lib_json/json_reader.cpp +++ b/src/lib_json/json_reader.cpp @@ -358,8 +358,6 @@ Reader::addComment(Location begin, Location end, CommentPlacement placement) { assert(lastValue_ != 0); lastValue_->setComment(std::string(begin, end), placement); } else { - if (!commentsBefore_.empty()) - commentsBefore_ += "\n"; commentsBefore_ += std::string(begin, end); } } diff --git a/test/data/test_comment_02.json b/test/data/test_comment_02.json index ccf631f..297d889 100644 --- a/test/data/test_comment_02.json +++ b/test/data/test_comment_02.json @@ -9,7 +9,8 @@ }, // C++-style comment "cpp-test" : { - // Internal comment cpp-style + // Multiline comment cpp-style + // Second line "c" : 3, "d" : 4 }