|
[Yaml-core] Interesting Indentations.
From: Jason Diamond <jason@in...> - 2001-06-13 17:07
|
Hi. I've been playing with my parser and have noticed that it's possible to fold scalars in a way that makes it unintuitive for human readers but still paresable (at least according to the way I've implemented my parser). The "tab(n)" type of productions are new to me so I'm not even sure if I've interpreted them correctly and so the following examples might not even be legal. This example: -------- hi: my name is stereo mike -------- and this one: -------- hi: my name is stereo mike -------- both get printed as: -------- hi: my name is stereo mike -------- This next example: -------- foo: @ bar baz quux -------- gets printed as: -------- foo: @ bar baz quux -------- Both of these don't look right to my human eye based on the indentation but do make logical sense when I take the time to analyze them. Are these correct? If they are, could examples like these be included in the draft? (I think more examples are needed overall, by the way.) Or, should it be required that all the successive lines of a folded scalar be at the exact same indentation so that we never have to worry about encountering this kind of YAML? Thanks, Jason Diamond http://injektilo.org/ |
| Thread | Author | Date |
|---|---|---|
| [Yaml-core] Interesting Indentations. | Jason Diamond <jason@in...> |