aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ucl_parser.c5
-rw-r--r--tests/basic/11.in3
-rw-r--r--tests/basic/11.res2
3 files changed, 10 insertions, 0 deletions
diff --git a/src/ucl_parser.c b/src/ucl_parser.c
index 87685744716e..e51a54b77bc6 100644
--- a/src/ucl_parser.c
+++ b/src/ucl_parser.c
@@ -1661,6 +1661,11 @@ ucl_state_machine (struct ucl_parser *parser)
return false;
}
else {
+ /* Skip any spaces */
+ while (p < chunk->end && ucl_test_character (*p,
+ UCL_CHARACTER_WHITESPACE_UNSAFE)) {
+ ucl_chunk_skipc (chunk, p);
+ }
p = chunk->pos;
if (*p == '[') {
parser->state = UCL_STATE_VALUE;
diff --git a/tests/basic/11.in b/tests/basic/11.in
new file mode 100644
index 000000000000..3131fc7e1547
--- /dev/null
+++ b/tests/basic/11.in
@@ -0,0 +1,3 @@
+
+
+ {"key": "value"}
diff --git a/tests/basic/11.res b/tests/basic/11.res
new file mode 100644
index 000000000000..4b17c4b4eb1b
--- /dev/null
+++ b/tests/basic/11.res
@@ -0,0 +1,2 @@
+key = "value";
+