Michel Fortin Here

Weblog on Monday June 6, 2005

PHP Markdown 1.0.1b / PHP SmartyPants 1.5.1d

Following my previous weblog entry, here is the new version of PHP Markdown that should correct multiple problems visible on the previous PHP Markdown as a WordPress plugin.

The biggest change in this new version is a complete rewrite of the WordPress integration code. It is also now possible to deactivate Markdown in the comments of a WordPress weblog. Some syntax bug have also been fixed. The complete version history is available on the Markdown web page.

Finally, a problem with the _TokenizeHTML function was present in both PHP Markdown and PHP SmartyPants. In SmartyPants, that bug caused document type definitions (DOCTYPE) to be ignored and quote characters inside were changed to curly ones. PHP SmartyPants do not longer corrupt this kind of tag:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">

See the PHP Markdown and PHP SmartyPants web pages for a download link.

Discussion & Comments

Flo Thursday June 9, 2005 at 14:43

I created a small button for PHPMarkdown, feel free to use it to advertise this great script :)

PHP Markdown

Derik Monday June 13, 2005 at 12:47

Hey Michael, I think I may have found a bug. I can’t reproduce it with Gruber’s Markdown Dingus or your PHP Markdown Dingus though. It may be particular to WordPress. It seems to affect nested quotes. It evens seems to cause a problem when you use nested blockquotes with pure XHTML (so it may be a Wordpress problem alone basically unrelated to PHP Markdown). Take a look at this reduction.

Thanks for the great software.

Michel Fortin Thursday June 16, 2005 at 20:46

I found Derik’s bug. The “balanceTags” filter in WordPress does not handle nested blockquotes. That is a shame for something supposed to “correct bad html.”

Fortunately, you can “fix” this yourself by unchecking the “WordPress should correct invalidly nested XHTML automatically” in Option > Writing.

I’ve filled a bug in WordPress bug tracker about this.

Michel Fortin Thursday June 16, 2005 at 20:58

Actually, I haven’t actually posted the bug report as I just found this one. From what I can see, there is already a fix for this.

Derik Thursday June 16, 2005 at 23:14

Thanks Michel! You pinned it down exactly.

Also see the French discussion about this entry.

Discussion is now closed for this entry. Feel free to contact me if you have something interesting to say.


Site powered by: Reflex