• Resolved knittingand

    (@knittingand)


    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 5 years, 6 months ago by knittingand.
Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author wipeoutmedia

    (@wipeoutmedia)

    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

    (@knittingand)

    @wipeoutmedia Thanks for the clarification.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Unrecoverable syntax error?’ is closed to new replies.