Problems with the current 1.2 specification
Duncan Cross <[email protected]> Sat, 17 Oct 2015 11:54:10 +0100
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <CAChYW+wZ35EMbmapxEgUnYxb+fMJt+R0mOn=S9=s_13fFab1Tw@mail.gmail.com> |
Hi, new user here. These are a few things I noticed while reading
through the specification recently, mostly the second half of the
specification.
Example 8.5: One of the lines uses a different "linebreak" down-arrow
glyph than every other instance in the document (U+21D3 instead of
U+2193):
··⇓
Example 8.12: Normalized output changes the line " * line" to " *
lines". (It seems that the input is at fault, though, to be consistent
with previous examples.)
(input:)
* line↓
(output:)
\ * lines\n\
Example 8.13: (i) Same problem as 8.12, above; (ii) The output adds an
extra \n to the start:
(input:)
>
folded
line
(output:)
!!str "\n\
folded line\n\
Example 8.19: In the normalized output, an extra comma separates the
"earth: blue" key from the "moon: white" value, splitting the one
key-value pair into two, one with a null value and one with a null key
respectively.
!!map {
? !!map {
? !!str "earth"
: !!str "blue"
}, # << here
: !!map {
? !!str "moon"
: !!str "white"
},
}
Example 9.3: An in-line comment on block scalar literal text is
removed instead of retained:
(input:)
|
%!PS-Adobe-2.0 # Not the first line
(normalized output:)
!!str "%!PS-Adobe-2.0\n"
Example 9.5: Missing s-separate-in-line between "YAML" and "1.2" in
the second document:
%YAML1.2
Example 10.8: In the normalized output form, the Booleans key is
missing an end-quote:
!!str "Booleans: !!seq [
Example 10.9: Same problem as 10.8, above.
- - -
Also, for section 8.1.1.1 I would recommend some extra clarification
in the text on these points, ideally with some new examples (possibly
red "invalid" examples):
(i) Whether zero is valid or not -- it looks like it is from the
grammar, as ns-dec-digit will accept it, but it seems like this is
possibly unintended.
(ii) If a literal/folded scalar is the only content of a document, and
it specifies a block indentation indicator, whether that indentation
number needs to be "one more" than you might expect it to be, because
the root indentation of a YAML document is -1.
Thanks for reading,
-Duncan
------------------------------------------------------------------------------
_______________________________________________
Yaml-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/yaml-core