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

inline javascript syntax hightlighting is broken #164

Open
redtopia opened this issue Jul 7, 2015 · 18 comments
Open

inline javascript syntax hightlighting is broken #164

redtopia opened this issue Jul 7, 2015 · 18 comments

Comments

@redtopia
Copy link

redtopia commented Jul 7, 2015

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
Copy link
Author

redtopia commented Jul 8, 2015

Could be related to this issue:

sublimehq/Packages#63

@FichteFoll
Copy link
Member

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.

@redtopia
Copy link
Author

redtopia commented Jul 8, 2015

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

@FichteFoll
Copy link
Member

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

@atomi
Copy link
Contributor

atomi commented Jul 8, 2015

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

@redtopia
Copy link
Author

redtopia commented Jul 8, 2015

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?

@atomi
Copy link
Contributor

atomi commented Jul 8, 2015

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.

@redtopia
Copy link
Author

redtopia commented Jul 8, 2015

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/

@atuttle
Copy link

atuttle commented Jul 8, 2015

@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. :)

@atomi
Copy link
Contributor

atomi commented Jul 8, 2015

@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

@FichteFoll
Copy link
Member

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 [...]…".

@atomi
Copy link
Contributor

atomi commented Jul 9, 2015

@FichteFoll I didn't know that. Thanks!

@redtopia
Copy link
Author

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

@atomi
Copy link
Contributor

atomi commented Jul 15, 2015

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

@redtopia
Copy link
Author

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.

@atomi
Copy link
Contributor

atomi commented Jul 15, 2015

@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

@ArtskydJ
Copy link

ArtskydJ commented Mar 7, 2016

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

@AlexanderReichl
Copy link

Hey,

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

Kind regards

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