Skip to content
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

String quote handling #11

Open
berland opened this issue Feb 27, 2020 · 1 comment
Open

String quote handling #11

berland opened this issue Feb 27, 2020 · 1 comment
Labels
bug Something isn't working postponed E.g. a bug not urgent, postponed for various reasons

Comments

@berland
Copy link
Collaborator

berland commented Feb 27, 2020

This cannot be parsed:

rms:
  COHIBA: "ON" ~ <>

as it gives a yaml.parser.ParserError: while parsing a block mapping

This works fine:

rms:
  COHIBA: ON ~ <>

and is probably the canonical way to do it, but yaml will let this pass with no problems:

rms:
  COHIBA: "ON"

which can create confusion.

@jcrivenaes
Copy link
Collaborator

This is difficult to fix with the current implementation.

A possible solution would be to "pre-parse" the YAML files and split into two files (or streams) before actual YAML parsing. One with actual value and one with template values.

Side note: The YAML parser evaluates "ON" to True, not to the string "ON"

@jcrivenaes jcrivenaes added bug Something isn't working postponed E.g. a bug not urgent, postponed for various reasons labels Apr 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working postponed E.g. a bug not urgent, postponed for various reasons
Projects
None yet
Development

No branches or pull requests

2 participants