Using Marked with Markdown Extra?

bob's Avatar

bob

11 Oct, 2016 11:43 PM

I know there are way too many flavors of Markdown, but I'm partial to Markdown Extra.

How do I set up Marked to use Markdown Extra for rendering?

  1. Support Staff 1 Posted by Brett on 12 Oct, 2016 01:18 AM

    Brett's Avatar

    Is there a specific syntax you're trying to enable? Overall MultiMarkdown shares the same extended syntax, but if you set up a custom processor with /usr/bin/php and the path to the PHP markdown extra executable, it should be possible. Haven't tested with that one, though.

    -Brett

  2. 2 Posted by bob on 12 Oct, 2016 06:11 PM

    bob's Avatar

    One is this construct:

    ![Aperture Icon](/images/icons/aperture.png){.image-left .image-25}

    Another is similar:

    ![Capture One Pro Color Tools](color-tools.jpg "Capture One Pro Color Tools"){.caption .image-right .image-25}

    From this general syntax:

    https://michelf.ca/projects/php-markdown/extra/#spe-attr

  3. Support Staff 3 Posted by Brett on 13 Oct, 2016 05:07 PM

    Brett's Avatar

    It is possible to run Markdown Extra as a command line tool, which means it's possible to run your Markdown through it in Marked. PHP isn't the easiest to work with, though, so I might suggest using the ruby utility maruku instead (which I think supports all Markdown Extra syntax and definitely handles the class markers you're using).

    There's also the Python Markdown package which can do the same, if that's easier.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac