Hi, First of all, thanks to John Gruber for the fantastic Markdown syntax and parse/render system. Also, thanks to Michel Fortin for his PHP 4 version of Markdown. Based on those two works, I have completed a **plugin-aware** PHP 5 version of Markdown. You can see it in Subversion here: * <http://solarphp.com/svn/trunk/Solar/Markdown.php> * <http://solarphp.com/svn/trunk/Solar/Markdown/> Every Markdown rule is now a plugin, and new plugins can be added into the processing stream. I have taken some liberties with this implementation, such as using delimited integer markers instead of MD5 hashes, and changing some of the rule names (e.g., from "Anchors" to "Links" in one case, and from "ItalicsAndBold" to "EmStrong" in another). Solar_Markdown comes with unit tests for individual plugins, and passes the MarkdownTest suite John has so kindly published (except for the "advanced inline html" test, which apparently nobody passes at this point). * <http://solarphp.com/svn/trunk/tests/Test/Solar/Markdown/> I'm happy to take feedback and suggestions for improving the code, and I hope it can be of use to any PHP 5 folks who love Markdown. -- Paul M. Jones <http://paul-m-jones.com> Solar: Simple Object Library and Application Repository for PHP5. <http://solarphp.com> Savant: The simple, elegant, and powerful solution for templates in PHP. <http://phpsavant.com>
Le 15 ao?t 2006 ? 11:21, Paul M Jones a ?crit :> First of all, thanks to John Gruber for the fantastic Markdown > syntax and parse/render system. Also, thanks to Michel Fortin for > his PHP 4 version of Markdown.I find your announcement a little misleading. You make it sounds like PHP Markdown doesn't work with PHP 5. Just to make things clear, this isn't the case: PHP Markdown works equally well on PHP 4 and PHP 5; it was built with both in mind and is tested on both major versions of PHP regularly. I'd rather describe what you did this way: * you took PHP Markdown's internal transformations and made tiny, plugable modules out of each of then, then created a full parser for the Solar framework using these modules; * you made the code E_STRICT-compilant within PHP 5; * you arranged the code and the comments to fit PEAR coding standards. This is clearly impressive, but I wouldn't call this a port.> I have taken some liberties with this implementation, such as using > delimited integer markers instead of MD5 hashes, and changing some > of the rule names (e.g., from "Anchors" to "Links" in one case, and > from "ItalicsAndBold" to "EmStrong" in another).I've always wondered why John chose these function names. And going away from hashes seems like a good idea too. Michel Fortin michel.fortin@michelf.com http://www.michelf.com/
Paul M Jones <pmjones88@gmail.com> wrote on 8/15/06 at 10:21 AM:> I'm happy to take feedback and suggestions for improving the code, > and I hope it can be of use to any PHP 5 folks who love Markdown.Any word on performance differences from Michel's implementation? -J.G.