php-markdown-extra-extended - my humble attempt at extending php-markdown

David Parsons orc at
Wed Jul 13 15:54:29 EDT 2011

On Jul 13, 2011, at 1:12 AM, Egil Hansen wrote:

> Dear all,


> I have used Markdown via Drupal a few months now, with a customer site

> and my currently my own blog and based on that practical experience I

> wanted to add some extra functionality to PHP Markdown Extra, so out

> of this grow my (extended) weekend project



> The big missing item right now that I would like to implement is the

> ability to add classes to block and span elements. My basic idea is to

> use a syntax like this: {some class}

Adding classes & ids are kind of hideous. What I did with discount
was to extend the []() syntax to allow class: and id: pseudo-classes
(like [postoffice](class:caps) or version [2.1.0](id:v2.1.0) on spans,
and then extended the blockquote syntax to allow them as well, via



>more stuff

I tried to make up extensions that are visually not very obvious
(the other alternative -- floating {: words } after a block -- seems
a little too cluttery for me)

-david parsons

More information about the Markdown-Discuss mailing list