From: Clark C. E. <cc...@cl...> - 2003-08-05 16:22:28
|
On Tue, Aug 05, 2003 at 08:57:06AM +0300, Oren Ben-Kiki wrote: | 3.6.3 Explicit Indentation | | Typically the indentation level of a block scalar node is detected | from its first content line. This detection fails when this first | line is empty, contains a leading '#' character, or contains | leading white space characters. Hmm. I wasn't expecting ", contains a leading '#' character", is this intended to prevent the following? this: | # this is an error commented: out YAML I'm not certain I like this beacuse it makes it non-trivial to take a block of YAML (perhaps with a leading comment '#' ) and indenting it as a block scalar. | In such cases YAML requires that the indentation level for the | scalar node text content be given explicitly. This level is | specified as the integer number of the additional indentation | spaces used for the text content. Yes, this is clear. My bad for missing this. | There can be no comment lines inside a block scalar (they may follow it). Right. And they should follow it at a different indentation. My bad for not remembering this decision (which is a very good one as it makes cases like this easier to digest). | l-l-literal-chunk(n) ::= | l-blk-empty-line-feed(n)* ==> AHA! | ( l-literal-text(n) | | l-blk-empty-specific(n) ) Right. The empty line is content. Ok. ... After your post, I now agree that the spec rules out Why's example. This brings up two issues: 1. Does '#' exception need to be in 3.6.3? I'm not clear why it is done this way. 2. Should we allow for the indentation to be set at the first non-empty line? This would probably be a good policy, and would not cause any "look-ahead" issues, as the number of blank lines could be stored in a counter. Thank you Oren. Best, Clark |