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

fix digit escapes in java & php highlights #846

Merged
merged 1 commit into from
Oct 16, 2021

Conversation

the-mikedavis
Copy link
Member

A bit confusingly, the \d escape actually needs to be \\d to get picked up as the digit escape. As far as I can tell the \d just gets ignored. The java regex correctly matches constants but only because it doesn't end the regex with $. The PHP highlight currently mistreats the PI_314 in the following:

<?php
define("PI_314", 3.14);
echo PI_314;
?>

as a @constructor instead of a @constant.

connects #845

@archseer
Copy link
Member

Hmm interesting. These queries are verbatim from upstream tree-sitter grammars so you might want to raise an issue there too?

@archseer archseer merged commit be428a2 into helix-editor:master Oct 16, 2021
@the-mikedavis the-mikedavis deleted the fix-regex-digit-escape branch October 16, 2021 20:55
@the-mikedavis
Copy link
Member Author

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

Successfully merging this pull request may close these issues.

2 participants