From 9fd24aa23bb1a613240b8a41511acb237248a74b Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Wed, 10 Jul 2024 15:17:11 +0000 Subject: [PATCH] feat [skip ci]: update single_include --- single_include/toml.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/single_include/toml.hpp b/single_include/toml.hpp index 1205b70..f43cfd2 100644 --- a/single_include/toml.hpp +++ b/single_include/toml.hpp @@ -13413,7 +13413,14 @@ skip_multiline_spacer(location& loc, context& ctx, const bool newline_found { spacer.newline_found = true; auto comment = comm.as_string(); - if( ! comment.empty() && comment.back() == '\n') {comment.pop_back();} + if( ! comment.empty() && comment.back() == '\n') + { + comment.pop_back(); + if (!comment.empty() && comment.back() == '\r') + { + comment.pop_back(); + } + } spacer.comments.push_back(std::move(comment)); spacer.indent_type = indent_char::none;