Text::Markdown

Faisal N. Jawdat faisal at faisal.com
Fri Mar 4 21:00:01 EST 2005


As an experiment, I mangled Markdown.pl 1.02b1 into a perl module.

use Text::Markdown;

# this produces xhtml
$marked_down_text = Markdown($source_text);

# this produces html4
$marked_down_text = Markdown4($source_text);

Notes:

- At this point it's a lot of a hack.

- It's basically functions copied out of Markdown.pl,
   with a bunch of wrappers.

- There really are no docs other than this mail.  In
   fact, I'll probably copy it into the README file.
   There are doc files, but they're incomplete, wrong,
   and or just plain lying.

- Markdown4() is especially a hack, since it mangles
   some of Markdown's global variables and then calls
   Markdown.

- The MT and Blosxom code is largely removed.

- If this gains some popularity it will presumably get
   cleaned up, which will probably cause all sorts of
   other breakage.

- I haven't released this to anyone, and this mail is
   the first thing in any way resembling a public release.
   I'd ask that anyone who wants other people to see it
   let me know before distributing it further.

- At some point the URL will change, go away, or be
   replaced by an angry Sumerian god.

- If John asks me to take this down, I will.

- Also, it explodes.

If you'd like to play with it, you can find it here:

http://www.faisal.com/tmp/Text-Markdown-0.02.tar.gz

Please send any feedback my way.

-faisal



More information about the Markdown-Discuss mailing list