-
-
Notifications
You must be signed in to change notification settings - Fork 119
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
:@
reported as an invalid plain value in some flow contexts
#316
Comments
ingy further suggested that this might be a regression, and so it is: with yaml@1.10.2, the repro in the report here works as expected. |
Discussion happened in https://matrix.to/#/#chat:yaml.io so read that too... |
Thank you for spotting this! This was a lexer bug: a flag for tracking if a flow-collection key is a json-node was not being reset after the |
I'm glad the report was helpful. FYI, I've upgraded my installation to master, and I can confirm the fix is effective. I really appreciate the super-fast turnaround, thank you for the great library. 😃 |
Describe the bug
The character sequence
:@
is a valid flow plain value, but is reported as invalid in some contexts.Other sequences involving characters that are barred from starting a plain scalar are also reported as invalid, including
`
,%
, and probably others.To Reproduce
The reported error is
Plain value cannot start with reserved character @ at line 1, column 7:\n\n[[], :@]\n ^\n
Expected behaviour
A successful parse, with document contents of a sequence with two members (one empty sequence, and the string scalar ":@").
Versions (please complete the following information):
yaml
: yaml@2.0.0-8Additional context
I found mixed performance on this example (libfyaml and libyaml both parse successfully, but pyyaml and others do not), so I asked in the main YAML matrix chat. ingy confirmed that the input text is valid yaml, and suggested filing an issue on the yaml test suite, which I will be doing shortly.
The text was updated successfully, but these errors were encountered: