Egil Hansen
2011-Jul-13 08:12 UTC
php-markdown-extra-extended - my humble attempt at extending php-markdown
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 https://github.com/egil/php-markdown-extra-extended 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} I have been playing with some basic ideas for the syntax in this file but it is far from done: https://github.com/egil/php-markdown-extra-extended/blob/master/demo/notes/class-syntax-tests.txt I have looked through some of the archives on the mailing list, and have not seen this discussed before, so would love some input. In general, any input on my extension to PHP Markdown is welcome. This project is also a chance for me to practice regex (my regex-fu is weak), so please keep the regex-mocking to a minimum; I know it will be hard :) Thanks, Egil.
Waylan Limberg
2011-Jul-13 13:02 UTC
php-markdown-extra-extended - my humble attempt at extending php-markdown
On Wed, Jul 13, 2011 at 4:12 AM, Egil Hansen <egil at assimilated.dk> 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 > https://github.com/egil/php-markdown-extra-extended > > 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}If you're looking for prior art, I'd suggest Maruku's attribute lists [1]. I'm aware of at least two other markdown implementations which have adopted this. [1]: http://maruku.rubyforge.org/proposal.html#attribute_lists -- ---- \X/ /-\ `/ |_ /-\ |\| Waylan Limberg
David Parsons
2011-Jul-13 19:54 UTC
php-markdown-extra-extended - my humble attempt at extending php-markdown
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 > https://github.com/egil/php-markdown-extra-extended > > 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 >%class:smaller% >stuff or >%id:label% >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
Possibly Parallel Threads
- Maruku: a better Markdown interpreter for Ruby.
- Compilation error on mgcv_1.1-7 on OS X (10.3)
- Help to conduct a random factor analysis with binomial response
- Corrupt files after Samba-upgrade
- Order of Markdown and SmartyPants filters (was: Re: Markdown Support in Drupal6.14?)