mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 17:58:09 +08:00
Fix not checking for \\r\\n when parsing line comments
This commit is contained in:
@@ -1855,7 +1855,14 @@ skip_multiline_spacer(location& loc, context<TC>& 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;
|
||||
|
Reference in New Issue
Block a user