From a68543a8956d3d74ec87f56e61b4332eae9e11c6 Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Fri, 21 Jun 2019 13:10:02 +0900 Subject: [PATCH] fix: detect comment in stricter way --- toml/region.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/toml/region.hpp b/toml/region.hpp index e6a7e68..b6ac6e8 100644 --- a/toml/region.hpp +++ b/toml/region.hpp @@ -382,7 +382,7 @@ struct region final : public region_base // the above comment is not for "value", but {key="value"}. if(comment_found == std::find_if(this->last(), comment_found, [](const char c) noexcept -> bool { - return c == '}' || c == ']'; + return !(c == ' ' || c == '\t' || c == ','); })) { // unwrap the first '#' by std::next.