On Tue, Apr 09, 2002 at 09:54:16PM -0700, Neil Watkiss wrote:
| > However, when we added the explicit indent (#133),
| > we noted that this separator concept was no longer necessary and
| > I thought that we agreed to discontinue this construct.
| What construct? Document separators?
--ArbitrarySeparators should have been removed from the specification
as a part of the flexible indentation patches. We had --Arbitrary
when we had a strict one space per indentaion level rule. With that
rule we needed a way to allow content having -- in column zero. This
hack was borrowed from MIME and accomplishes this. Fortunately, since
we now have flexible indentation it can go away!
| > --- |1
| > This is document is also a scalar, without any
| > leading spaces. However, unlike the former,
| > --- can be used within the content. And since
| In the above example, you don't need the '1' anyway. You've indented the
| block by a non-zero amount, and document separators always occur in column
| zero. So this stream is legal (albeit confusing):
Right. I didn't demonstrate what I wanted to show. The following
*was* legal YAML in November, but as soon as we added flexible
indentation it became illegal, and it is now illegal:
This is an old style that is now illegal due to inconsistent
indenting. The OldStyle is needed so that a
-- separator can go in column one of the content.
Note, under the OldStyle this sentance has one leading space.
Right now, you'd write this as...
This is a new style version of a similar thing, that
uses |1 to avoid inconsistent indenting. Also it allows
-- separator at column one of the content.
Does this make sense? Anyway... I'm absolutely certain of it
now... the --OldStyle is a blast from the past and should have
been removed. My apologies for not keeping tabs on the spec!
As I recall, the _only_ document separator should be "---"
in column one. That's it, the --OldStyle isn't needed anymore
as you so clearly detail below...
| --- #YAML:1.0 |
| --- #YAML:1.0 ]
| A YAML stream stored inside another YAML document.
| How does this compared to escaping XML content in XML? Very Well!
| --- #YAML:1.0 |
| No explicit indent is needed because we're at column 1 here.
| There's no ambiguity, to my eye. Leading space in a nested leaf
| is part of the indentation, unless:
| a) it's explicitly marked as content using the indentation marker you
| mentioned; or,
| b) it's indented more than the first line.