diff --git a/toml/serializer.hpp b/toml/serializer.hpp index b3e3637..cba2923 100644 --- a/toml/serializer.hpp +++ b/toml/serializer.hpp @@ -333,6 +333,11 @@ struct serializer current_line += ','; } } + if(!current_line.empty()) + { + if(current_line.back() != '\n') {current_line += '\n';} + token += current_line; + } token += "]\n"; return token; }