# PHP Markdown Extra fork for MathJax

Dr. Drang drdrang at gmail.com
Fri Oct 1 11:00:50 EDT 2010

Wedging the code for inline math into parseSpan was the hardest part.
I was expecting series of span-handling functions as in Gruber's
original and Penney's MultiMarkdown.

Since I don't really know how to code in PHP, subclassing never occurred to me.

I agree that it's better to call it an extension rather than a fork.
It still does everything other than math just like PHP Markdown Extra.
The repository's README does refer to it as extension.

On Tue, Sep 28, 2010 at 9:59 AM, Michel Fortin
<michel.fortin at michelf.com> wrote:

> Le 2010-09-28 à 10:08, Dr. Drang a écrit :

>

>> My fork of Michel Fortin's PHP Markdown Extra has been updated to

>> include support for MathJax as well as jsMath. Both of these are

>> JavaScript libraries for using LaTeX syntax, e.g., $$E = mc^2$$, to

>> include high quality, scalable equations (not just bitmapped images of

>> equations) in your HTML pages.

>

> If I read that well, it's more an extension than a fork.

>

> I took a look at your changes, and it seems that most of the modifications could easily be done in a subclass of the MarkdownExtra_Parser class (adding functions, adding entries in the span/block gamut arrays), the one notable exception being the parseSpan function.

>

> I'm not complaining or suggesting anything, only making the observation that parseSpan in PHP Markdown & PHP Markdown Extra is somewhat in the way of making extensions by subclassing.

>

>

> --

> Michel Fortin

> michel.fortin at michelf.com

> http://michelf.com/

>

>

>

> _______________________________________________

> Markdown-Discuss mailing list

> Markdown-Discuss at six.pairlist.net

> http://six.pairlist.net/mailman/listinfo/markdown-discuss

>