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

Perl: Incorrect Syntax Highlighting #30699

Closed
atif089 opened this issue Jul 14, 2017 · 3 comments
Closed

Perl: Incorrect Syntax Highlighting #30699

atif089 opened this issue Jul 14, 2017 · 3 comments
Assignees
Labels
languages-basic Basic language support issues

Comments

@atif089
Copy link

atif089 commented Jul 14, 2017

VSCode Version: Code 1.14.0
OS Version: Mac OSX
Configured Language: Perl

The the following code

if ( $product->{url} and $memcached_search ) {
    $product->{url}.=$product->{url}=~m{\?}?";":"?";
    $product->{url}.='s='.$memcached_search.'X'.++$pos;
}

Near ~m{\?}? if you add space between closing } and ? then the syntax looks fine otherwise it looks broken. I'm using the material theme but this appears on any theme.

I think the fix has something to do with the Perl tmLanguage file but I don't know where to find it and what rule I should be looking for :(

Demo : http://i.imgur.com/bjhypxh.gif

@aeschli
Copy link
Contributor

aeschli commented Jul 17, 2017

This issue was moved to textmate/perl.tmbundle#25

@aeschli aeschli closed this as completed Jul 17, 2017
@atif089
Copy link
Author

atif089 commented Jul 21, 2017

@aeschli Thanks for forwarding the issue to TextMate. If I want to fix this locally, can you point me the path of the file where I can make changes to in order to fix this for myself?

I can also probably send a pull request to TextMate repo but I'm not sure when they will merge it.

Or is it possible to override this in form of a plugin?

@aeschli
Copy link
Contributor

aeschli commented Aug 2, 2017

Yes, grammars from extensions will replace the built-in grammar.
See here for a starting point.

But the best would be a pull request against the perl grammar and to avoid forking the grammar.

@vscodebot vscodebot bot locked and limited conversation to collaborators Nov 17, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
languages-basic Basic language support issues
Projects
None yet
Development

No branches or pull requests

3 participants