From: why the lucky stiff Date: 2004-04-10T00:13:01+09:00 Subject: Re: RedCloth bug and suggestion Jim Menard wrote: > > bq. -- some text > > turns into > >

bq.—some text

> The rule was: if an em-dash '--' is surrounded by spaces, the spaces get stripped, so the dash can snug up against the words it's near. But, in the case of a period, I think we should keep the space. So the above should work now and sentences which start with an em-dash should be easier to look on. > It looks like RedCloth is following the Textile "spec" (though I can't > find one anywhere). Is anyone else surprised by this output? The spec is the PHP source code, the regexps. > Also, I'd like to know if Textile is supposed to preserve newlines. When > I have text like > > A paragraph that spans > multiple lines. > > it gets translated to > >

A paragraph that spans
> multiple lines.

> > when what I would *like* is > >

A paragraph that spans > multiple lines.

> > Is there a setting I can change so that more than one newline starts a > new paragraph but a single newline does not? No. Personally, I use YAML to handle the folding of my text. So the above could be stored in my YAML: --- > A paragraph that spans multiple lines. Then, RedCloth.new( YAML::load( above_string ) ).to_html. So, if you like, I could strip the folding code out of the old YAML.rb and use it in RedCloth. _why