• Resolved Ihatetomatoes

    (@ihatetomatoes)


    Hi there, I have been using SyntaxHighlighter Evolved on my WP blog for a while. Everything works fine in the PHP templates.

    Now I am converting my front-end to React and querying the content of each post via GraphQl.

    The SyntaxHighlighter snippets are coming wrapped only in <pre> tag, is there a way to add also <code> inside of it?

    Other syntax highlighter are returning both <pre><code>...</code></pre>.

    Is there a setting or option to add this?

    Thanks for your response.

Viewing 1 replies (of 1 total)
  • Plugin Author Peter Kiss (a11n)

    (@yscik8)

    Hey!
    There is no configuration for this, but it’s possible to add a filter to render_block, and change the wrapping tags with a preg_replace. ($block_content in that filter callback will be the already rendered output HTML)

Viewing 1 replies (of 1 total)
  • The topic ‘Access snippet in React front-end’ is closed to new replies.