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

Incorrect Syntax Highlighting (regex string) #141

Open
ibanez270dx opened this issue Jun 3, 2013 · 0 comments
Open

Incorrect Syntax Highlighting (regex string) #141

ibanez270dx opened this issue Jun 3, 2013 · 0 comments

Comments

@ibanez270dx
Copy link

Hi all,
FYI, when using a single frontslash in a line, the highlighter assumes it's a regex string, which breaks syntax highlighting basically all the way through my coffeescript file. This breaks in TM2, but seems to work in TM1. For example, a line such as:

x = ((width-height)/2)

will assume that EVERYTHING until the end of the file is a regex expression, and thus no syntax highlighting. Pretty useless. The cultprit is "string.regexp.coffee". Removing this from the CoffeeScript language grammers fixes my problem (although now it doesn't highlight regex strings properly):

{
name = 'string.regexp.coffee';
begin = '/(?![\s=/*+{}?])';
end = '(/)[igmy]{0,4}(?![a-zA-Z0-9])';
beginCaptures = { 0 = { name = 'punctuation.definition.string.begin.coffee'; }; };
endCaptures = { 1 = { name = 'punctuation.definition.string.end.coffee'; }; };
patterns = ( { include = 'source.js.regexp'; } );
},

Thanks!

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

1 participant