Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Syntax highlighting after the hash character #83

Closed
marty80 opened this issue Apr 20, 2016 · 5 comments
Closed

Syntax highlighting after the hash character #83

marty80 opened this issue Apr 20, 2016 · 5 comments

Comments

@marty80
Copy link

marty80 commented Apr 20, 2016

The syntax highlighting stops working after the hash character, but it shouldn't.

screenshot

@thecfguy
Copy link

Similar issue with string has // and variable with # sign,

<cfset myurl = "http://localsite.com/q=#variables.query#">

@willthemoor
Copy link

Came to report something similar. Think it might have something to do with the scope within cfoutput tags.

image

<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.

@Mootly
Copy link

Mootly commented Sep 23, 2016

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.

@dnando
Copy link

dnando commented Nov 21, 2016

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.

screen shot 2016-11-21 at 14 57

A clue to what might be going on here is if I remove the quotation marks around the href attribute, functionality is restored.

@Mootly
Copy link

Mootly commented Nov 21, 2016

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants