From: Adam Shelly Date: 2006-11-26T05:29:09+09:00 Subject: Re: RedCloth issues On 11/25/06, Paul Lutus wrote: > Louis J Scoras wrote: > > > On 11/25/06, Paul Lutus wrote: > > > >> All except the part where it didn't work. > > > > *Chuckles.* Of course. The best-laid schemes o' mice an' men and all > > that. > > > >> You are arguing that it should work in principle, even if it doesn't work > >> in fact. And I agree. > >> > >> Yes. Agreed. My point is that there are much simpler solutions. > > > > And so we come to the point where both parties discover that there > > isn't much disagreement over most of the substantive points. That > > being said, I need to ask what you think simpler solutions are. Mind > > you I ask this not in a glove-slapping, defend your honor type of way. > > On the contrary, I'd be genuinely interested in such a solution. > > Very simple: tell me what the requirement is. I will then post a solution. > The solution will (1) work, and (2) not be large or incomprehensible -- or > I will fail, and if that happens I will say so. > Ok, I'll jump back into my question, after a 2 day break for turkey gluttony. I think the 'requirement' could be stated at two levels. 1) In the simplest case, it is to take a string formatted according to the RedCloth rules, and to have code blocks in that string render correctly. Where 'correctly' means that a) text inside code blocks is not interpreted as markup - specifically that pairs of asterisks don't get replaced by tags. b) all the words are rendered in the original order, so that given text = <... tags yourself when entering code into the wiki. I can live with that - although it takes away some of the ease of use which led me to choose a wiki in the first place. On the other hand, I think requirement 1b can be viewed as a failed unit test for RedCloth. RedCloth is supposed to support the markdown formatting rules, yet in this case you get misplaced text even if you restrict it to the markdown ruleset with `RedCloth.new(text).to_html(:markdown)` I was hoping someone would address that issue. -Adam