Re: minor errors in examples in the 1.2 spec
Jesse Beder <beder-d0mtIEKrxfl4piUD7e9S/[email protected]>
| Newsgroups | gmane.text.yaml.general |
|---|---|
| Message-ID | <CAMrtdsRRKvwjSK_zM3jO0hWE5BSv9ukfEqNQYGwBBVFbstXwTQ@mail.gmail.com> |
You're right :)
Although I think both examples are still incorrect, although I'm not
sure about the first.
For example 8.5, under the "keep" indicator, the spec reads, "In this
case, the final line break and any trailing empty lines are considered
to be part of the scalar’s content." However, I'm not sure I
understand the part about trailing comments. If the example is
correct, then
keep: |+
# text↓
↓
will produce {keep: "#text\n\n"}, but
keep: |+
# text↓
↓
# Trail
will produce {keep: "#text\n"}, which seems strange (why should adding
a comment at the end remove a newline from the content?).
Example 8.21 looks like:
literal: |2
value
folded: etc
and here, the default chomping style should be "clip", for which "the
line break character of the last non-empty line (if any) is preserved
in the scalar’s content", so it should produce {literal: "value\n",
folded: etc}.
Thanks,
Jesse
On Wed, Sep 7, 2011 at 9:37 AM, Andrey Somov <[email protected]> wrote:
> As far as I know PyYAML does not support 1.2 yet...
>
> -
> Andrey
>
> On Tue, Sep 6, 2011 at 8:08 AM, Jesse Beder <[email protected]> wrote:
>> I believe there are errors in examples 8.5 and 8.21 in the 1.2 spec.
>> (In both cases, pyyaml (compiled using libyaml) agrees with me.)
>>
>
> ------------------------------------------------------------------------------
> Using storage to extend the benefits of virtualization and iSCSI
> Virtualization increases hardware utilization and delivers a new level of
> agility. Learn what those decisions are and how to modernize your storage
> and backup environments for virtualization.
> http://www.accelacomm.com/jaw/sfnl/114/51434361/
> _______________________________________________
> Yaml-core mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/yaml-core
>
------------------------------------------------------------------------------
Using storage to extend the benefits of virtualization and iSCSI
Virtualization increases hardware utilization and delivers a new level of
agility. Learn what those decisions are and how to modernize your storage
and backup environments for virtualization.
http://www.accelacomm.com/jaw/sfnl/114/51434361/
_______________________________________________
Yaml-core mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/yaml-core