Repository navigation
Is it possible to disable inline comments? #179
Replies: 1 comment
|
Unfortunately not, no. The spec and peoples expectations about YAML is too
ingrained at this point to change.
…On Tue, 12 Apr 2022, 20:23 jrom99, ***@***.***> wrote:
I want to have a hexcode schema, as in:
from strictyaml import Map, Regex, load
color_schema = Regex(r"#[a-fA-F0-9]{6}")schema = Map({"color": color_schema})
load("color: #aaaaaa", schema)
But the above code fails with
strictyaml.exceptions.YAMLValidationError: when expecting string matching #[a-fA-F0-9]{6}
found non-matching string
in "<unicode string>", line 1, column 1:
color: '' #aaaaaa
^ (line: 1)
I think this is due to # being interpreted as an inline comment, which
empties color value. Is there any way to disable them?
—
Reply to this email directly, view it on GitHub
<#179>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABOJKNN4GPFFXFDOAM74LXLVEXEUNANCNFSM5TIJQFKA>
.
You are receiving this because you are subscribed to this thread.Message
ID: ***@***.***>
|
0 replies
Answer selected by
jrom99
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
I want to have a hexcode schema, as in:
But the above code fails with
I think this is due to
#being interpreted as an inline comment, which emptiescolorvalue. Is there any way to disable it?All reactions