From: why the lucky stiff Date: 2004-03-15T05:30:44+09:00 Subject: Re: UseFold in YAML Gerard A.W. Vreeswijk wrote: > I try to make YAML fold newlines. Sometimes it does, sometimes it > doesn't. Does anyone has an idea of what's happening here? Or is > this just the way YAML works? Thanks. i hate the way folding works right now. it's quite nonsensical. i'd like to improve it so it could be customized at each node. # where `str', `str2', `str3' contains long text str.to_yaml = {:fold => true, :width => 80} str2.to_yaml = {:fold => false} str3.to_yaml = {:fold => true, :keep => false} # root settings will be overriden by individual singleton's settings [str, str2, str3].to_yaml( :fold => true } the `keep' setting refers to keeping end newlines (the '+' and '-' options in YAML). with `keep' set to false, no effort would be made to keep newlines. how does this sound? _why