WordPress.org

Ready to get started?Download WordPress

Forums

WP-Markdown
Shortcode support? (3 posts)

  1. dwhitevisoft
    Member
    Posted 1 year ago #

    I am trying to use wp-markdown and SyntaxHighlighter Evolved. SyntaxHighligher uses shortcodes (or pre tags with a special class). I've tried to get the shortcodes to work, however wp-markdown messes with them on the conversion causing funky results. This really just boils down to shortcode support. In one of the issues you mentioned wanting to support them; is this still on the horizon? Perhaps there is a workaround?

    Thanks,
    -Damien
    http://wordpress.org/extend/plugins/wp-markdown/

  2. dwhitevisoft
    Member
    Posted 1 year ago #

    I've been playing around with syntax highlighting, and I'm thinking I may dump SyntaxHighlighter Evolved. I've been using it (well Alex Gorbatchev's) for years with all of my source code. But your plugin gave me a different idea. Since the prettify.js file in your plugin simply uses jQuery to modify pre tags, all my old code examples get highlighting. That's an excellent idea! I like the simplicity of the Google Code Prettify, and am thinking of migrating my blog to use it or perhaps another lighter-weight highlighter using your simple approach.

    By the way, fantastic plugin... I've been looking for a Markdown solution for quite some time now, and nothing seems to match up to your approach.

    Thanks,
    Damien

  3. Stephen Harris
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Damien,
    Apologies for the delayed response. Shortcodes, in general, should work (images, captions etc). However if there is content inside the shortocodes, it needs to be on its own line(s) so the Markdown->HTML parser doesn't get confused.

    As for syntax highlighters in particular - I've not tried any, but I can imagine that they could well confuse the plug-in. I've found Google Prettify to (usually) a very easy and stable solution. It is an excellent idea, but not mine. The inspiration for the plug-in is the Stack Exchange sites - and this mainly their solution ported to WordPress (along with some very good HTML <--> MarkdDown parsers - again, not by me). Overall, I did very little :).

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic