From: Oren Ben-K. <or...@ri...> - 2002-09-24 20:36:10
|
Brian Ingerson [mailto:in...@tt...] wrote: > I'm not sure we want to consider '- ' to be part of the > indentation. This allows the following: > > --- > foo: > - bar: > baz: boom > ... Not so... The above is an error. 'baz' is less-indented than 'bar' and is not at the same level as 'foo'. There are only three valid ways 'baz' may be indented (each meaning something else): --- foo: - bar: baz: boom # Same indent as 'foo', so this is # key:value in map containing 'foo' --- foo: - bar: baz: boom # Same indent as 'bar', so this is # key:value in map containing 'bar' --- foo: - bar: baz: boom # More indented than 'bar', so this is # key:value in map that is value for the # 'bar' key. ... All three are "what you would expect". In all three cases, the indentation of 'bar' is taken to be "two spaces", even though one of them is physically a '-' - hence my wording. Have fun, Oren Ben-Kiki |