Support » Plugins » [Plugin: SyntaxHighlighter Evolved] Conflict with Markdown Extra plugin

  • See, third code block. The <p></p> tags are being inserted automatically.

    My code is:

    0x5906	movl	0x00007274,%eax
    0x590b	calll	0x00004f52	Anon42
    0x5910	testb	%al,%al
    0x5912	je	0x00005930
    0x5914	movl	$0x00006ed5,0x04(%esp)	802.1X is active – exiting
    0x591c	jmpl	0x00005378

    I am using the Markdown Extra plugin ( along with SyntaxHighlighter Evolved. If I disable it, the problem goes away. I’m not sure who to blame for the problem, however. Perhaps I can make syntax highlighter higher priority so that it modifies the post first?

Viewing 8 replies - 1 through 8 (of 8 total)
  • SyntaxHighlighter runs at 9. You can lower it or raise Markdown Extra — that’ll probably fix it.

    add_filter( 'the_content', array(&$this, 'parse_shortcodes'), 9 );

    This only sort of fixes things – it results in the HTML markup not being added, but still escapes the quotes.

    This means that the page renders properly but that the original markdownsource is full of &quot;$1&quot; issues

    Move my plugin to 8 (infact I think in the latest version it’s lower than that) and then Markdown to 9. Just as long as they’re both below 10 (where quotes, paragraphs, etc. happen), it’ll be fine.

    I have this problem as well.

    I’ve tried changing the priority on add_filter in SyntaxHighlighter to 8 and then markdown to 9, like this:

    add_filter('the_content', 'Markdown', 9);

    .. to no avail. Still <p>’s are inserted in the source code.

    My plugin runs at 7 by default and will replace all shortcodes with <pre>. Markdown may need to be told to leave the insides of <pre> tags alone.

    Yeah you’re right, Markdown leaving the insides of pre-tags would def. solve the problem.

    I will try and see if that can be done.


    It appears that Markdown does ignore stuff between block-level tags (e.g., <div>, <pre>, etc.), but only if they are simple. If you add keywords (e.g.,<pre class="brush:php">) then it doesn’t notice them. A trick which I have found to work is simply to wrap the syntax highlighter <pre> block with a plain <div> block. For example,
    <div><pre class="brush:php">blah</pre></div>

    Great thebamf! That fixes the problem. Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: SyntaxHighlighter Evolved] Conflict with Markdown Extra plugin’ is closed to new replies.