From: Neil K. <neilk@ActiveState.com> - 2001-09-14 20:16:45
|
On Fri, Sep 14, 2001 at 12:52:48PM -0700, Neil Kandalgaonkar wrote: > On Thu, Sep 13, 2001 at 09:16:36PM -0400, Kirrily 'Skud' Robert wrote: > > > I desperately want YAML to support vertical whitespace (blank lines) and > > comments. > > For what it's worth, I (yaml.py implementer) would like to see these > things too. hrm, although I can see the value in NOT having vertical whitespace. What if you have a value you want to store as a block, and it has several significant blank lines at the end? The simplest thing I can think of is to have a '.' end of block character. foo: This block has two significant blank lines at the end No really . bar: This is the next value In practice, this means, for deserialization: trim trailing whitespace from all block values if the final characters are '\n.\n', remove the '.\n' for serialization: if the value has whitespace at the end, tack on '.\n' BTW, this can also handle the case about chomping final newline! chomped: This will be chomped notchomped: This will NOT be chomped . -- Neil Kandalgaonkar, ActiveState ASPN - ActiveState Programmer Network http://ASPN.ActiveState.com/ |