Title: Error in Syntax highlighting
Last modified: May 8, 2021

---

# Error in Syntax highlighting

 *  Resolved [w3com](https://wordpress.org/support/users/w3com/)
 * (@w3com)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/error-in-syntax-highlighting/)
 * I really like this plugin and it works smoothly. But is some cases the plugin
   fails to function properly.
 * For example, in some of the pages in my website, the highlighted code is displayed
   as shown below:
 * Dim char1, char2 As Char
    Code language: VB.NET (vbnet)
 * Could you please tell me why this is happening? Please note it only happens in
   few of my pages.

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Thread Starter [w3com](https://wordpress.org/support/users/w3com/)
 * (@w3com)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/error-in-syntax-highlighting/#post-14415761)
 * When I click the Edit as HTML it shows as this
 * <p r e c l a s s = “wp-block-code” >< c o d e>Dim char1, char2 As Char< / c o
   d e ></ p r e >
    -  This reply was modified 5 years, 1 month ago by [w3com](https://wordpress.org/support/users/w3com/).
    -  This reply was modified 5 years, 1 month ago by [w3com](https://wordpress.org/support/users/w3com/).
    -  This reply was modified 5 years, 1 month ago by [w3com](https://wordpress.org/support/users/w3com/).
    -  This reply was modified 5 years, 1 month ago by [w3com](https://wordpress.org/support/users/w3com/).
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/error-in-syntax-highlighting/#post-14415810)
 * Please share the URL where the issue can be seen.
 * Also, what theme are you using?
 *  Thread Starter [w3com](https://wordpress.org/support/users/w3com/)
 * (@w3com)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/error-in-syntax-highlighting/#post-14415913)
 * This is the URL
 * [https://www.w3computing.com/vb2008/vb-character-variables/](https://www.w3computing.com/vb2008/vb-character-variables/)
 * I use Genesis framework with Magazine theme
 *  Thread Starter [w3com](https://wordpress.org/support/users/w3com/)
 * (@w3com)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/error-in-syntax-highlighting/#post-14415927)
 * And also I just noticed that in few pages the the highlighted code area is just
   blank.
 * [https://www.w3computing.com/vb2008/vb-formatting-numbers/](https://www.w3computing.com/vb2008/vb-formatting-numbers/)
 * [https://www.w3computing.com/vb2008/vb-variable-scope/](https://www.w3computing.com/vb2008/vb-variable-scope/)
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/error-in-syntax-highlighting/#post-14416305)
 * I don’t see any blank areas in those links:
 * > ![](https://i0.wp.com/cldup.com/r0pEwsvC1M.png?ssl=1)
 * But I am seeing unstyled code in the first link you shared:
 * > ![](https://i0.wp.com/cldup.com/cWeSmnB0af.png?ssl=1)
 * There may be a CSS concatenation issue coming from LiteSpeed Cache.
 * Otherwise, the issue maybe this one which was previously reported: [https://github.com/westonruter/syntax-highlighting-code-block/issues/286](https://github.com/westonruter/syntax-highlighting-code-block/issues/286)
 * That issue has a prototype fix which is available for testing: [https://github.com/westonruter/syntax-highlighting-code-block/pull/287#issuecomment-778473998](https://github.com/westonruter/syntax-highlighting-code-block/pull/287#issuecomment-778473998)
    -  This reply was modified 5 years, 1 month ago by [Weston Ruter](https://wordpress.org/support/users/westonruter/).
 *  Thread Starter [w3com](https://wordpress.org/support/users/w3com/)
 * (@w3com)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/error-in-syntax-highlighting/#post-14416413)
 * Hello Weston,
 * Above you have pasted the code for listing 2.5. There’s listing 2.4 as well which
   simply doesn’t display anything. When I disable your plugin it shows. Please 
   take a closer look.
 * I will try the solutions you have sent me and update you.
 *  Plugin Author [Weston Ruter](https://wordpress.org/support/users/westonruter/)
 * (@westonruter)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/error-in-syntax-highlighting/#post-14416442)
 * The 2.4 isn’t showing because your ad has `float:left` and it lacks a clearfix
   so the code is showing out of the viewport:
 * > ![](https://i0.wp.com/cldup.com/Iouf1KtWgy.png?ssl=1)
 * You can fix this with the following CSS code:
 *     ```
       .wp-block-code {
           clear: both;
       }
       ```
   
 *  Thread Starter [w3com](https://wordpress.org/support/users/w3com/)
 * (@w3com)
 * [5 years, 1 month ago](https://wordpress.org/support/topic/error-in-syntax-highlighting/#post-14416464)
 * Wow! This simple line of css code does seem to fix all the issues. Thank you!!!

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Error in Syntax highlighting’ is closed to new replies.

 * ![](https://ps.w.org/syntax-highlighting-code-block/assets/icon.svg?rev=3406002)
 * [Syntax-highlighting Code Block (with Server-side Rendering)](https://wordpress.org/plugins/syntax-highlighting-code-block/)
 * [Support Threads](https://wordpress.org/support/plugin/syntax-highlighting-code-block/)
 * [Active Topics](https://wordpress.org/support/plugin/syntax-highlighting-code-block/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/syntax-highlighting-code-block/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/syntax-highlighting-code-block/reviews/)

 * 8 replies
 * 2 participants
 * Last reply from: [w3com](https://wordpress.org/support/users/w3com/)
 * Last activity: [5 years, 1 month ago](https://wordpress.org/support/topic/error-in-syntax-highlighting/#post-14416464)
 * Status: resolved