Commit 840b65c
committed
Fix closing flow sequence after explicit key
The fix in #295 was not correct.
# cat a.yaml
---
[?]
# Before
% ./tests/run-parser-test-suite --flow keep < a.yaml
+STR
+DOC ---
+SEQ []
+MAP {}
-SEQ
-DOC
-STR
% ./tests/run-loader a.yaml
[1] Loading 'a.yaml': run-loader: loader.c:470: yaml_parser_load_sequence_end: Assertion `parser->document->nodes.start[index-1].type == YAML_SEQUENCE_NODE' failed.
[1] 21446 IOT instruction (core dumped) ./tests/run-loader a.yaml
# After
% ./tests/run-parser-test-suite --flow keep < a.yaml
+STR
+DOC ---
+SEQ []
+MAP {}
=VAL :
=VAL :
-MAP
-SEQ
-DOC
-STR
% ./tests/run-loader a.yaml
[1] Loading 'a.yaml': SUCCESS (1 documents)1 parent 588eabf commit 840b65c
1 file changed
Lines changed: 3 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1059 | 1059 | | |
1060 | 1060 | | |
1061 | 1061 | | |
1062 | | - | |
1063 | | - | |
1064 | | - | |
1065 | | - | |
1066 | | - | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
1067 | 1065 | | |
1068 | 1066 | | |
1069 | 1067 | | |
| |||
0 commit comments