From a6d38c1ec07cd6857311825d2d89deee59890493 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Tue, 22 Sep 2020 17:36:24 +0900 Subject: [PATCH] fix: add a quick temporary patch for comment dup first aid for #131 --- toml/serializer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toml/serializer.hpp b/toml/serializer.hpp index ed07f46..77cc71e 100644 --- a/toml/serializer.hpp +++ b/toml/serializer.hpp @@ -651,7 +651,7 @@ struct serializer tmp += '\n'; } - if(!kv.second.comments().empty() && !no_comment_) + if(!kv.second.comments().empty() && !no_comment_ && tmp.front() != '#') { for(const auto& c : kv.second.comments()) {