diff --git a/parser/src/scanner.rs b/parser/src/scanner.rs index 8f2be8c..57ee8c8 100644 --- a/parser/src/scanner.rs +++ b/parser/src/scanner.rs @@ -1697,6 +1697,7 @@ impl> Scanner { // From spec: To ensure JSON compatibility, if a key inside a flow mapping is JSON-like, // YAML allows the following value to be specified adjacent to the “:”. + self.skip_to_next_token()?; self.adjacent_value_allowed_at = self.mark.index; self.tokens.push_back(tok); diff --git a/parser/tests/yaml-test-suite.rs b/parser/tests/yaml-test-suite.rs index f13cf71..570f696 100644 --- a/parser/tests/yaml-test-suite.rs +++ b/parser/tests/yaml-test-suite.rs @@ -297,9 +297,6 @@ fn expected_events(expected_tree: &str) -> Vec { #[rustfmt::skip] static EXPECTED_FAILURES: &[&str] = &[ - // Flow mapping colon on next line / multiline key in flow mapping - "5MUD", - "K3WX", // Bare document after end marker "7Z25", "M7A3",