jcberquist / sublimetext-cfml

CFML (ColdFusion and Lucee) package for Sublime Text
MIT License
115 stars 24 forks source link

Ternary operator breaks syntax colouring #88

Closed gt-kahootz closed 7 years ago

gt-kahootz commented 7 years ago

When using the ternery operator <test> ? <if-true> : <if-false>, the syntax colouring breaks - the next immediate CF tag is not coloured correctly, but the one after is. This is also the case for the elvis operator ?:

So in the following example:

<cfset bob = (option eq 1) ? 'hello' : 'world'>
<cfoutput>#bob#</cfoutput>

The <cfoutput> is not coloured as a valid CF tag, but the closing </cfoutput> is.

If I wrap the entire ternary in parens then the syntax colouring is OK, but I shouldn't have to do that.

jcberquist commented 7 years ago

Sorry about this. I am bouncing back and forth between this sort of issue and #86 - I think a more complete solution will be necessary. It should be fixable though.

gt-kahootz commented 6 years ago

Thanks for the quick fix, John!