mirror of
https://github.com/ToruNiina/toml11.git
synced 2025-09-17 17:58:09 +08:00
fix: skip whitespaces without newline
This commit is contained in:
@@ -45,6 +45,16 @@ BOOST_AUTO_TEST_CASE(test_file_as_literal)
|
|||||||
b = "baz"
|
b = "baz"
|
||||||
)"_toml;
|
)"_toml;
|
||||||
|
|
||||||
|
BOOST_TEST(r == v);
|
||||||
|
}
|
||||||
|
{
|
||||||
|
const toml::value r{
|
||||||
|
{"array_of_tables", toml::array{toml::table{}}}
|
||||||
|
};
|
||||||
|
const toml::value v = u8R"(
|
||||||
|
[[array_of_tables]]
|
||||||
|
)"_toml;
|
||||||
|
|
||||||
BOOST_TEST(r == v);
|
BOOST_TEST(r == v);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -1751,6 +1751,7 @@ parse_ml_table(location<Container>& loc)
|
|||||||
using skip_line = repeat<
|
using skip_line = repeat<
|
||||||
sequence<maybe<lex_ws>, maybe<lex_comment>, lex_newline>, at_least<1>>;
|
sequence<maybe<lex_ws>, maybe<lex_comment>, lex_newline>, at_least<1>>;
|
||||||
skip_line::invoke(loc);
|
skip_line::invoke(loc);
|
||||||
|
lex_ws::invoke(loc);
|
||||||
|
|
||||||
table_type tab;
|
table_type tab;
|
||||||
while(loc.iter() != loc.end())
|
while(loc.iter() != loc.end())
|
||||||
|
Reference in New Issue
Block a user