From: Jim Menard Date: 2004-04-10T20:39:15+09:00 Subject: Re: RedCloth bug and suggestion _why_, > checked into redcloth cvs. there's a :fold_lines accessor which can > be used to toggle it. > > r = RedCloth.new "... text ..." > r.fold_lines = true > r.to_htmlthrough > > basically, it just treats single newlines like a space. Thank you. It works for paragraphs, but not list items. If I have * item one * item two that spans multiple lines * item three the output is multiple lines RedCloth works by performing substitutions in the text all at once, if I'm not mistaken. I'm not sure that this situation can be handled by search-and-replace; I think you have to walk the string with a state machine and further complicate Textile's rules by saying "a line item ends not with a newline but with multiple newlines or with the start of a new line item". Ugh. Jim -- Jim Menard, jimm@io.com, http://www.io.com/~jimm/ "No quantity can be harder to perceive and harder to measure than innovation that never occurs." -- J. Gleik