From: Paul Lutus Date: 2006-11-26T03:50:08+09:00 Subject: Re: RedCloth issues Louis J Scoras wrote: > On 11/25/06, Paul Lutus wrote: > >> The fact that much harder problems has been solved isn't an argument that >> this one has been. :) > > That's not what I'm suggesting. Perhaps I misunderstand--indeed I've > been known to do that from time to time =). Me too. > You seem to be arguing > that, due to the inherent complexity, the problem is insurmountable or > at least so complex that its not worth the effort to find the > solution. No, not at all. I am saying that a much simpler solution would work where this one will not. > I don't really think it's that hard of a problem. It doesn't matter how hard or easy it is. It only matters that the OP can't get the desired result from the present solution. >> 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. And further, if the solution I create were to be taken as a total solution to all such problems, and if the adopter didn't even consider editing it to accommodate new cases, then it would become part of the problem, not the solution, just like the present "solution" is. I suspect that the present difficulty arose because whoever wrote Textile did so to solve all imaginable problems with HTML formatting, then whoever wrote RedCloth did so to solve all imaginable problems with Textile formatting. I suspect both authors did this because it was easier to build onto the edifice than to try to understand and change the prior code. But both authors also wrote a lot of code to avoid leaving out any possibilities -- except what the OP wants to do -- and therefore their code is rather difficult to change. Now we have an OP who can't use RedCloth to talk to Textile to talk to HTML, to get presentable HTML. The solution is obvious -- start over. I suspect that I can produce a solution in a few lines of Ruby, and if I can't I will say so. -- Paul Lutus http://www.arachnoid.com