mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-18 19:10:11 +08:00
fix: detect comment in stricter way
This commit is contained in:
@@ -382,7 +382,7 @@ struct region final : public region_base
|
|||||||
// the above comment is not for "value", but {key="value"}.
|
// the above comment is not for "value", but {key="value"}.
|
||||||
if(comment_found == std::find_if(this->last(), comment_found,
|
if(comment_found == std::find_if(this->last(), comment_found,
|
||||||
[](const char c) noexcept -> bool {
|
[](const char c) noexcept -> bool {
|
||||||
return c == '}' || c == ']';
|
return !(c == ' ' || c == '\t' || c == ',');
|
||||||
}))
|
}))
|
||||||
{
|
{
|
||||||
// unwrap the first '#' by std::next.
|
// unwrap the first '#' by std::next.
|
||||||
|
Reference in New Issue
Block a user