From: why the lucky stiff Date: 2003-12-13T03:33:11+09:00 Subject: Re: YAML treatment of '#' character in middle of a string Treatment of the comment character has long been discussed on the yaml-core list and has changed a bit in the spec over this year. Currently, any pound character which is preceded by space trims to the next newline as a comment. Yes, quotes can overcome this weakness. --- plain: one #this is a comment quoted: 'one # this is not a comment' also plain: one#this is not a comment and also: one# this is also not a comment I do agree with the rule. I can see compelling reasons to follow plain scalars with descriptive comments. I don't see the compelling reason for the space-pound in plain scalars. But if you have a good use case, hop on yaml-core ML and lay it out for us, Brother Black. _why On Thursday 11 December 2003 05:11 pm, David A. Black wrote: > Hi -- > > I'm wondering whether the "#" and everything after it are > really supposed to be taken out of the string in this > example: > > irb(main):015:0> YAML.load("---\nstring: one # two") > => {"string"=>"one"} > > I guess I can wrap it all in quotation marks, but I didn't > think I had to. > > > david