From bcaf5baf887382e73d33fce307843fd626dce37e Mon Sep 17 00:00:00 2001 From: ToruNiina Date: Wed, 12 Dec 2018 12:14:11 +0900 Subject: [PATCH] fix parse_array_of_table_key allow whitespace before and after [[ and ]] (like, [[ a.b ]]) --- toml/parser.hpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/toml/parser.hpp b/toml/parser.hpp index fd06ece..8cfb884 100644 --- a/toml/parser.hpp +++ b/toml/parser.hpp @@ -1216,6 +1216,7 @@ parse_array_table_key(location& loc) "toml::parse_array_table_key: no `[[`", inner_loc, "should be `[[`")); } + lex_ws::invoke(inner_loc); const auto keys = parse_key(inner_loc); if(!keys) { @@ -1223,6 +1224,7 @@ parse_array_table_key(location& loc) "toml::parse_array_table_key: invalid key", inner_loc, "not key")); } + lex_ws::invoke(inner_loc); const auto close = lex_array_table_close::invoke(inner_loc); if(!close) {