Title: HTML syntax highlighting in PHP code snippets is broken
Last modified: June 2, 2023

---

# HTML syntax highlighting in PHP code snippets is broken

 *  Resolved [jbradt](https://wordpress.org/support/users/jbradt/)
 * (@jbradt)
 * [3 years ago](https://wordpress.org/support/topic/html-syntax-highlighting-in-php-code-snippets-is-broken/)
 * If I have the following code snippet
 *     ```wp-block-code
       add_action('wp_footer', function() {
       ?>
       <div>Hello</div>
       <?php
       });
       ```
   
 * In older versions of the plugin, it would properly recognize that <div>Hello</
   div> was HTML and would syntax highlight it accordingly, but now it seems to 
   think that piece of code is PHP still. Can this be fixed?
    -  This topic was modified 3 years ago by [jbradt](https://wordpress.org/support/users/jbradt/).

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

 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [2 years, 12 months ago](https://wordpress.org/support/topic/html-syntax-highlighting-in-php-code-snippets-is-broken/#post-16823800)
 * Thanks for reporting this. I’ll look into putting together a fix.
 *  Plugin Author [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * (@bungeshea)
 * [2 years, 9 months ago](https://wordpress.org/support/topic/html-syntax-highlighting-in-php-code-snippets-is-broken/#post-17043233)
 * Looks like this has since been fixed:
 * ![](https://i0.wp.com/i.imgur.com/EZjJhAB.png?ssl=1)

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

The topic ‘HTML syntax highlighting in PHP code snippets is broken’ is closed to
new replies.

 * ![](https://ps.w.org/code-snippets/assets/icon.svg?rev=2148878)
 * [Code Snippets](https://wordpress.org/plugins/code-snippets/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/code-snippets/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/code-snippets/)
 * [Active Topics](https://wordpress.org/support/plugin/code-snippets/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/code-snippets/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/code-snippets/reviews/)

 * 2 replies
 * 2 participants
 * Last reply from: [Shea Bunge](https://wordpress.org/support/users/bungeshea/)
 * Last activity: [2 years, 9 months ago](https://wordpress.org/support/topic/html-syntax-highlighting-in-php-code-snippets-is-broken/#post-17043233)
 * Status: resolved