Home Download Buy Blog Forum Support

mixing modes (expressionengine and JS or PHP)

mixing modes (expressionengine and JS or PHP)

Postby fcgrx on Sun May 05, 2013 12:40 am

i'm using a package for expressionengine syntax support. it works OK but it doesnt handle when youre mixing syntaxes like this:

JAVASCRIPT FILE:

Code: Select all
   {!-- THIS IS AN EXPRESSIONENGINE COMMENT BUT THE SYNTAX HIGHLIGHTER DOESNT RECOGNIZE IT --}
   $('#field').addClass('foo');
   $('#field').addClass('f{!-- ALL HELL BREAKS LOOSE --}oo');
{if logged_in}
   $('#field').addClass('loggedin');
{/if}

you can either let the file default to javascript syntax and it does a bad and confusing job of highlighting, OR set the format to ExpressionEngine in which case it recognizes the comments for what they are but then you cant take advantage of javascript autocompletion....

any idea how to approach this issue?
especially in a way that doesnt require hacking files that may get overwritten with future updates of packages?
fcgrx
 
Posts: 23
Joined: Sat May 04, 2013 1:58 am

Return to Technical Support

Who is online

Users browsing this forum: No registered users and 30 guests