PHP 5 port of Markdown, plugin-based
Paul M Jones
pmjones88 at gmail.com
Wed Aug 16 10:23:27 EDT 2006
On Aug 16, 2006, at 9:16 AM, Michel Fortin wrote:
> Le 16 août 2006 à 9:39, Paul M Jones a écrit :
>> So the functional/procedural PHP-Markdown is a little more than
>> twice as fast as plugin-capable Solar_Markdown. If you transform
>> the source text anew on every page load, this might be an issue;
>> if you cache the transformed text for subsequent page loads, it's
>> probably not.
> Interesting numbers. PHP Markdown has been optimized quite much,
> it'd probably be hard to beat, speed-wise, for another PHP
Yeah, the use of multiple classes in separate files does create more
overhead than using only functions in one file.
> I'm preparing a version of PHP Markdown which is more extendable
> too, and it'll probably be as fast as the current version.
We can certainly benchmark it once it's ready; I'd be happy to
include your final product in the Solar_Markdown benchmarks for
> I'm also changing the way span elements are parsed to prevent
> **things *like** this* from generating invalid markup. It may or
> may not be slower once ready since I'm also removing other code
> obsoleted by the process.
This would be very nice; it's been a common request for Text_Wiki.
> Interesting: I just found out that Solar Markdown is using the HTML
> Tidy library (built into PHP 5) to fix bad XHTML at the end of the
> process. That's clever. How come you've not mentioned it before? :-)
Heh. :-) It's optional, and turned off by default iirc. I have it
mostly to standardize whitespace, not to fix HTML. (Hm, might also
be a solution to the "invalid markup" problem you note above.)
More information about the Markdown-Discuss