Closed marty80 closed 6 years ago
Similar issue with string has // and variable with # sign,
<cfset myurl = "http://localsite.com/q=#variables.query#">
Came to report something similar. Think it might have something to do with the scope within cfoutput
tags.
<a href="foo.html#anchor">Link text</a>
<p> Working <em>fine</em>.</p>
<a href="http://blah.cc/foo.html#anchor">Link text</a>
<p> Working <em>fine</em>.</p>
<a href="https://blah.cc/my.cfm?paramid=#get_current_paramID()#">Link text</a>
<p>
This text is fine. The scope |here| is:
text.html.cfml
</p>
<cfoutput>
<a href="https://blah.cc/my.cfm?paramid=#get_current_paramID()#">Link text</a>
<p>
This text and tag have the same highlighting as a string. The scope |here| is:
text.html.cfml
meta.scope.cfoutput.cfml
meta.tag.inline.any.html
string.quoted.double.html
string.quoted.double.cfml
</p>
</cfoutput> <!-- Hey, that works -->
<p> Still broken here though! The scope |here| is:
text.html.cfml
meta.scope.cfoutput.cfml
meta.tag.inline.any.html
string.quoted.double.html
string.quoted.double.cfml
</p>
I poked around the source but couldn't make heads or tails of the what/why. Hope this helps someone with a bigger brain than me.
I am getting this too:
Breaks: <li><a href="mailto:#application.emailHelp#">Contact Support</a></li>
Correct: <li><a href="mailto&##58;#application.emailHelp#">Contact Support</a></li>
Removing the cfoutput block does indeed fix the color coding, as does moving it directly into the string.
Add that to the stuff above, and it looks like the syntax highlighter does not like hash marks after certain bits of punctuation when inside a cfoutput block.
I'm seeing a similar issue where both syntax highlighting and code completion is breaking after an & in the query string of an a href tag. See attached screenshot.
A clue to what might be going on here is if I remove the quotation marks around the href attribute, functionality is restored.
The color coding starting at the ampersand may be complicated by any error or validation parsing you have. Mine flags them as needing to be escaped to &. Could certainly be some contention adding to the wonkiness.
The syntax highlighting stops working after the hash character, but it shouldn't.