atuttle / atom-language-cfml

:space_invader: A CFML Language for the Atom Editor
38 stars 24 forks source link

Syntax Highlighting breaks with <cfhttp> #52

Closed mikoMK closed 9 years ago

mikoMK commented 9 years ago

If you include the protocol in the URL and use a CFML variable as parameter value, the highlighting breaks for the rest of the document. Everything is colored like a string except for the number signs. When you remove either the protocol or the CFML variable, the highlighting works again.

Example

2015-07-30 13_26_13-test cfm - s__pro-alter_ch - atom

Atom version: 1.0.3 language-cfml version: 0.8.8

dajester2013 commented 9 years ago

Can you try switching the grammar to CFML instead of HTML (CFML) and see if that changes anything? On Jul 30, 2015 6:29 AM, "mikoMK" notifications@github.com wrote:

If you include the protocol in the URL and use a CFML variable as parameter value, the highlighting breaks for the rest of the document. Everything is colored like a string except for the number signs. When you remove either the protocol or the CFML variable, the highlighting works again. Example

[image: 2015-07-30 13_26_13-test cfm - s__pro-alter_ch - atom] https://cloud.githubusercontent.com/assets/9440351/8982145/98eb839e-36be-11e5-9084-2ae1f5ae4457.png

Atom version: 1.0.3 language-cfml version: 0.8.8

— Reply to this email directly or view it on GitHub https://github.com/atuttle/atom-language-cfml/issues/52.

kliakos commented 9 years ago

I think it's the ## inside the string at the tag parameter that break the highlighting. I see this often.

mikoMK commented 9 years ago

@dajester2013 It doesn't matter, which grammar I use.

rwatts3 commented 9 years ago

What's the solution to this. It's definitely when #" is existing. If I remove the # it works fine. Is there a quick place to fix this ?

skiant commented 9 years ago

More specifically, it's the double slash that seems to cause problems.

A single slash seems doesn't seem to create this kind of issue. I guess this has something to do with the regex patterns, might be a clash with the comments patterns ?

rwatts3 commented 9 years ago

That's a good start it's definitely someone to do with the slash. I've tested this and can confirm.

elpete commented 9 years ago

This is a bug when running the language-hyperlink package included by default in Atom. A failing test case has been added to the project to make it easier to know how and when it is fixed.

elpete commented 9 years ago

I've opened a pull request on language-hyperlink that should fix our issue with url's here.

https://github.com/atom/language-hyperlink/pull/5

elpete commented 9 years ago

The pull request was accepted. Next version of atom should fix this issue! 👍

skiant commented 9 years ago

Great news, thanks a lot for your effort! :+1:

mikoMK commented 9 years ago

Thank you very much @elpete for the great work!