Re: Re: patch for Text/Wiki/rules/url.php
| From: | Paul M Jones | Date: | Wed, 07 Jan 2004 02:44:55 +0000 |
| Subject: | Re: Re: patch for Text/Wiki/rules/url.php | ||
| References: | 1 2 3 | Groups: | php.pear.dev |
| Request: | Send a blank email to pear-dev+get-24839@lists.php.net to get a copy of this message | ||
Hi, Jim,
i have a more general problem with the paragraph rule, but it may be working as intended and that just differs from my intentions. ;)[you were expecting]
<p>This is the third paragraph.</p>[but instead get]
This is the third paragraph.I fear that it is the expected behavior for the regex. Not exactly intentional, but does work as programmed. ;-) For what it's worth, I am considering "forcing" a leading newline and trailing newline on the text to be parsed; that seems to fix all manner of errors at the end of the text. You may wish to try it and see how it works for you. "Tighten" ends up removing them nicely, and paragraphs come out right. Would you find that an adequate solution?
i'm probably just getting tripped up in understanding the wiki syntax you've implemented (since i see the example texts use \ at the end of the line for line continuation, but that seems rather ugly).I agree that it's ugly; I took the suggestion from Bash. But no, the "no-paragaph-at-end-without-trailing-newline" is not an artifact of the backslash line concats, so far as I can tell.
what i'm working on is using Text_Wiki to parse pages from an existing PhpWiki 1.2 install. (and if you've poked around in the PhpWiki 1.3 code, you might understand why. ;)I have. PhpWiki has its flaws, but I would not have been able to get anywhere with Text_Wiki without PhpWiki (and Tavi, and coWiki) to guide me. Hey, when you discover the proper rule set, would you consider contributing them to Text_Wiki? I'd like to start collections of rule sets for specific Wiki implementations and distribute them as part of the Text_Wiki package.
with 8 new rules (and the above tweaks), it seems to be able to handle all the pages i'm throwing at it, but i haven't really played with how those new rules may interact with the existing ones.Yes, well, that's where the fun starts. ;-) -- Paul M. Jones pmjones@ciaweb.net Savant: the simple alternative to Smarty. http://phpsavant.com/