Support » Plugin: SyntaxHighlighter Evolved » Using SyntaxHighlighter Evolved with Markdown

  • Resolved prandrews73

    (@prandrews73)


    I’m using a markdown plugin, but I can usually escape from markdown using markdown="0"

    The code below get displayed as syntax highlighted HTML instead of Python. what can I do to fix this please?

    
    <div markdown="0">
    [code language="""python"""]
    def find_intervals(data):
        pass
    
    data = 'A'
    assert find_intervals(data) == [(0, 0, 'A')]
    data = 'BBABBA'
    assert find_intervals(data) == [(0, 1, 'B'), (2, 2, 'A'), (3, 4, 'B'), (5, 5, 'A')]
    data = 'ABBAABBAA'
    assert find_intervals(data) == [(0, 0, 'A'), (1, 2, 'B'), (3, 4, 'A'), (5, 6, 'B'), (7, 8, 'A')]
    data = ''
    assert find_intervals(data) is None
    [/code]
    </div>
    

    This editor (WP forum) added extra “” around “python”. My code does not have that.

    Here is some sample output:

    
    <span class="kwd">def</span><span class="pln"> find_intervals</span><span class="pun">(</span><span class="pln">data</span><span class="pun">):</span><span class="pln">
        </span><span class="kwd">pass</span><span class="pln">
     
     
    data </span><span class="pun">=</span><span class="pln"> </span
    
    • This topic was modified 10 months, 3 weeks ago by prandrews73.
    • This topic was modified 10 months, 3 weeks ago by prandrews73.
    • This topic was modified 10 months, 3 weeks ago by prandrews73.
Viewing 1 replies (of 1 total)
  • Plugin Author Renatho

    (@renathoc)

    Hey @prandrews73!

    Hum. It seems your markdown plugin doesn’t skip for these cases.

    If you are using block editor in your WP, I recommend you test adding a new block called SyntaxHighlighter Code instead of using the shortcode (https://ps.w.org/syntaxhighlighter/assets/screenshot-2.png?rev=2004415). If it still doesn’t work, I recommend you contacting the markdown plugin support to check if there is another alternative.

    Or if it works for you, maybe you could use some alternative to add markdown only when you want. A suggestion: https://jetpack.com/support/jetpack-blocks/markdown-block/

    As this is not a problem with SyntaxHighlighter Evolved, I am marking this topic as resolved, but if you have other questions related to SyntaxHighlighter Evolved in the future, you can contact us again.

Viewing 1 replies (of 1 total)
  • The topic ‘Using SyntaxHighlighter Evolved with Markdown’ is closed to new replies.