Why is tab valid in key/value pair in YAML parser?

syntax, yaml

Solution

According to the specification, both tab (U+0009) and space (U+0020) are considered “white space characters” that may be used to delimit tokens.

So what makes you think it's illegal in that context? Especially considering that example 6.3 makes it clear that it's valid:

Example 6.3. Separation Spaces

-·foo:→·bar
- -·baz
  -→baz 

(`·` denotes a space (U+0020), while `→` denotes a tab character (U+0009)).

Problem

``` t: test ``` Pay attention that it's a tab after `:`,and I used this YAML parser to test whether it's valid or not(IMO it's not valid): ``` Array ( [t] => test ) ```

Original source