• Is there a way to exclude posts or maybe a scenario where there is an existing class name in the code tag?

    I have legacy posts that were imported and already have inline styles. I want to exclude those older posts but use Crayon going forward.

    Here is an example of what I’m trying to get Crayon to ignore, or would like to exclude a range of posts.

    <code style="color: #008200;">//My code comments here</code></span></div>
    <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"><code style="color: #006699; font-weight: bold;">var</code> <code style="color: #000000;">App = {};</code></span></div>
    <div style="background-color: #ffffff;"><span style="margin-left: 0px !important;"> </span></div>
    <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"><code style="color: #000000;">(</code><code style="color: #006699; font-weight: bold;">function</code> <code style="color: #000000;">() {</code></span></div>
    <div style="background-color: #ffffff;"><code>    </code><span style="margin-left: 12px !important;"><code style="color: #000000;">...</code></span></div>
    <div style="background-color: #f8f8f8;"><span style="margin-left: 0px !important;"> </span></div>
    <div style="background-color: #ffffff;"><code>    </code>

    https://wordpress.org/plugins/crayon-syntax-highlighter/

  • The topic ‘Exclude posts or regex?’ is closed to new replies.