eemeli / yaml

YAML parser and stringifier for JavaScript
https://eemeli.org/yaml
ISC License
1.32k stars 116 forks source link

Comment `separator` parsed as `indentation` #548

Closed RedCMD closed 5 months ago

RedCMD commented 6 months ago

Describe the bug not 100% sure if this is just a spec ambiguity Github also doesn't like it

To Reproduce

:
    #comment??
  a: b
  #comment
    #comment??

Expected behaviour I would have expected the tab char to be parsed as a whitespace separator rather than treated as indentation

Versions:

Additional context image image

eemeli commented 5 months ago

Yup, that should count as an l-comment, which is allowed to have tabs before it.