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 6 variables #2909
Comments
|
We've had the same kind of grammar interpretation differences in the past between Sublime Text and Linguist. What was happening is that GitHub and Sublime Text were using different regexp processors: GitHub uses a PCRE-based engine whereas Sublime Text uses Oniguruma. I don't know what Atom is using but it could be the same kind of discrepancies. You should try to tweak your regular expressions. In particular, I'd try to replace |
|
Thanks for your reply! Yes I do believe this is the issue. Atom does indeed use Oniguruma and I have tried to take advantage of this fact. I will see what I can do to fix this while still remaining compatible with both engines. |
|
@pchaigno That property was definitely the blocker for this rule! I've updated my repo and tried with Lightshow and it works perfectly. Should I submit a PR to update the submodule or could someone just bump it to the latest commit? |
Glad I could help 😄
No need, it'll be automatically updated with the next release of Linguist ;) |
For some reason, my variable rule is being skipped (or not catching) by linguist (Atom/Highlights has no problem with it though).
Here's the rule to save you from clicking a link. It's in the
variableentry of the repository and I'm sure it's not catching because the sigil ($,@,%,&) is left as bare text.{ 'match': '(?x) (\\$|@|%|&) (\\.|\\*|:|!|\\^|~|=|\\?)? ( (?:\\p{Alpha}) (?: [a-zA-Z0-9_\xc0-\xff\\$]| [\\-\'][a-zA-Z_\xc0-\xff\\$] )* )' 'captures': '1': 'name': 'variable.other.identifier.sigil.perl6fe' '2': 'name': 'support.class.twigil.perl6fe' '3': 'name': 'variable.other.identifier.perl6fe' 'name': 'meta.variable.container.perl6fe' }The text was updated successfully, but these errors were encountered: