ColdFusion icon indicating copy to clipboard operation
ColdFusion copied to clipboard

inline javascript syntax hightlighting is broken

Open redtopia opened this issue 8 years ago • 18 comments

I'm using ST3 build 3094 with the ColdFusion package on Windows 7 x64. Not exactly sure when it broke, but it was recently. I installed a ST3 update yesterday, but I was not doing any JS work so I didn't notice if that update caused the problem.

All subsequent syntax highlighting from the `' to the end of the file is broken:

    <cfoutput>
    <script>
    $(document).ready(function() {
        mlBox({
            selector: $('##ml-school-badge')
        });
        <cfif schoolCFC.isDemo AND URL.showabout EQ "1">
        mlBox({
            selector: $('##aboutTeaching'),
            open:true
        });
        </cfif>
    });
    </script>
    <cfif x EQ y>
        <cfset y = 2>
    </cfif>
    <p>This is broken.</p>
    </cfoutput>

redtopia avatar Jul 07 '15 19:07 redtopia

Could be related to this issue:

https://github.com/sublimehq/Packages/issues/63

redtopia avatar Jul 08 '15 12:07 redtopia

Please make use of the new .sublime-syntax syntax definitions and the with_prototype injections. These are only available since 3092.

See http://www.sublimetext.com/docs/3/syntax.html.

FichteFoll avatar Jul 08 '15 14:07 FichteFoll

How do I make use of the new .sublime-syntax syntax definitions?

redtopia avatar Jul 08 '15 14:07 redtopia

This was mostly directed at the author(s) of this package. Other than that, follow the link above to read on how these work.

FichteFoll avatar Jul 08 '15 14:07 FichteFoll

I'm not doing any ColdFusion at all right now guys. I just don't really have any incentive to put the time and energy this package needs right now. So it's going to be up to you guys to pick up the ball on this package. :/

atomi avatar Jul 08 '15 18:07 atomi

I wish I had time to help... but I don't even know where to start. Any ideas on how this project can get some love?

redtopia avatar Jul 08 '15 18:07 redtopia

Yeah, theres lots of open issues. A big part of fixing this is doing what @FichteFoll suggests and porting to the new yaml format. I wrote most of the regex already but it could use some extra work for edge cases like yours. Syntax highlighting is the most important in my opinion and most issues will be related to that.

atomi avatar Jul 08 '15 18:07 atomi

Unfortunately, I'm not the guy who can take this over. Maybe you can reach out to the community and see who's out there who might have time/knowledge to get it done. Maybe reach out to Ray Camden through his blog... he might be able to help get the word out. http://www.raymondcamden.com/

redtopia avatar Jul 08 '15 19:07 redtopia

@atomi can you create a new branch and commit what you've got? My company is still heavily using this plugin and I may have to get more involved if it's going to fall behind.

I haven't got the first clue where to get started though. Any help would be appreciated, even if just links. :)

atuttle avatar Jul 08 '15 19:07 atuttle

@atuttle I don't have much experience with the new yaml sublime-syntax for highlighting as it's only been out a few months. The AAAPackageDev plugin should be able to convert plist to yaml http://stackoverflow.com/questions/25184605/cloning-a-sublime-text-3-highlighting-syntax-definition

atomi avatar Jul 08 '15 21:07 atomi

No, don't use the conversion tool from AAAPackageDev. It simply converts the plist data into the same yaml data but doesn't use the new format (which is more powerful, and the required feature for injecting contexts is only available there).

ST provides a command to convert a .tmLanguage file to .sublime-syntax by itself. Consider using my patched version from sublimehq/Packages#60 though, if you are using the "captures" key for both begin and end matches. To use it, just open a file that uses the syntax you want to change (or manually apply it to any view), then select "Tools > New Syntax from [...]…".

FichteFoll avatar Jul 08 '15 23:07 FichteFoll

@FichteFoll I didn't know that. Thanks!

atomi avatar Jul 09 '15 01:07 atomi

@atomi - I understand you don't have time to work on this project anymore. Have you made any progress on handing it off? This bug is pretty bad and it would be great to know if those people who are using this package should be moving away from it.

redtopia avatar Jul 15 '15 17:07 redtopia

@redtopia Yeah. I've tweeted about this and posted to the cfml-general slack. Hopefully more eyes will get to this issue for you. If you want to give it a shot I can add you as a collaborator as well.

atomi avatar Jul 15 '15 19:07 atomi

I wish I could help out... I really do but I'm not your guy. Did you mention it to Raymond Camden? He's probably got the biggest following in the CF community.

redtopia avatar Jul 15 '15 19:07 redtopia

@redtopia Yeah. Or a bounty https://www.bountysource.com/ :) But here's my tweet, retweet if you think it will help: https://twitter.com/atomi/status/621394493833547776

atomi avatar Jul 15 '15 20:07 atomi

You could also consider mentioning it to Ben Nadel. I think he is pretty big in the CF community.

ArtskydJ avatar Mar 07 '16 17:03 ArtskydJ

Hey,

is there any chance this issue with JS can be fixed?

Kind regards

AlexanderReichl avatar Jun 24 '16 11:06 AlexanderReichl