Title: Unrecoverable syntax error?
Last modified: September 23, 2018

---

# Unrecoverable syntax error?

 *  Resolved [knittingand](https://wordpress.org/support/users/knittingand/)
 * (@knittingand)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/unrecoverable-syntax-error/)
 * I’m creating code blocks from standard js like Google Analytics etc and keep 
   getting a syntax error on comments and the opening script line.
 * For example, these two lines will both have unrecoverable syntax errors.
 *     ```
       <!-- convert temperatures -->
       <script type="text/javascript">
       ```
   
 * Does the plugin add
 * `<script type="text/javascript">`
    and `</script>`
 * around the code and I should leave it out?
 * (Edited because I apparently can’t type this morning).
    -  This topic was modified 7 years, 6 months ago by [knittingand](https://wordpress.org/support/users/knittingand/).

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

 *  Plugin Author [wipeoutmedia](https://wordpress.org/support/users/wipeoutmedia/)
 * (@wipeoutmedia)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/unrecoverable-syntax-error/#post-10725198)
 * Hi there,
 * Thanks for your question.
 * When you add JavaScript such as a Google Analytics tag, then yes you need to 
   use the HTML opening tag <script type=”text/javascript”> and the closing tag 
   </script>.
 * Syntax errors may show if the ACE editor is set to the wrong language. Setting
   the editor to HTML or whatever you prefer is great for syntax highlighting and
   showing syntax errors, etc, but don’t worry about it too much, as your code should
   probably work just fine.
 * So if the editor language is set to say JavaScript, you should not get any errors
   except for the <script type=”text/javascript”> and </script> as they are HTML
   tags. But setting the editor to HTML may show errors in the script itself – it
   is a catch 22. 🙂
 * I hope this helps.
 * Regards,
    Damian Baker
 *  Thread Starter [knittingand](https://wordpress.org/support/users/knittingand/)
 * (@knittingand)
 * [7 years, 6 months ago](https://wordpress.org/support/topic/unrecoverable-syntax-error/#post-10727436)
 * [@wipeoutmedia](https://wordpress.org/support/users/wipeoutmedia/) Thanks for
   the clarification.

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

The topic ‘Unrecoverable syntax error?’ is closed to new replies.

 * ![](https://ps.w.org/css-javascript-toolbox/assets/icon-256x256.gif?rev=3132209)
 * [CSS & JavaScript Toolbox](https://wordpress.org/plugins/css-javascript-toolbox/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/css-javascript-toolbox/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/css-javascript-toolbox/)
 * [Active Topics](https://wordpress.org/support/plugin/css-javascript-toolbox/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/css-javascript-toolbox/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/css-javascript-toolbox/reviews/)

## Tags

 * [editor](https://wordpress.org/support/topic-tag/editor/)
 * [javascript](https://wordpress.org/support/topic-tag/javascript/)
 * [syntax errors](https://wordpress.org/support/topic-tag/syntax-errors/)

 * 2 replies
 * 2 participants
 * Last reply from: [knittingand](https://wordpress.org/support/users/knittingand/)
 * Last activity: [7 years, 6 months ago](https://wordpress.org/support/topic/unrecoverable-syntax-error/#post-10727436)
 * Status: resolved