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

Add injections for regex highlighting. #384

Merged
merged 1 commit into from
Mar 14, 2024

Conversation

patrickt
Copy link
Contributor

This will allow components of regexen to be highlighted on GitHub, in the manner of those in JS and Ruby.

This will allow components of regexen to be highlighted on GitHub, in the manner
of those in JS and Ruby.
@alex-pinkus
Copy link
Owner

Neat!

@alex-pinkus alex-pinkus merged commit c27af65 into alex-pinkus:main Mar 14, 2024
55 checks passed
@jtbandes
Copy link

jtbandes commented Mar 14, 2024

👀 Curious if this means it is calling out to a common regex grammar shared across other languages – or is there an opportunity to customize it for Swift? Swift has chosen to implement a (very extensive) superset of several regex dialects, and properly highlighting all these features may be a journey! (even Xcode does not yet do it 😄)

@patrickt
Copy link
Contributor Author

@jtbandes Yes, this calls out to the highlighting specified in https://github.com/tree-sitter/tree-sitter-regex. It sounds like we might need to augment some of its capabilities to match Swift’s new stuff.

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.

3 participants