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(elixir) Support function names with a slash #2406

Merged
merged 3 commits into from Feb 17, 2020

Conversation

joshgoebel
Copy link
Member

@joshgoebel joshgoebel commented Feb 17, 2020

  • Do not mistakenly recognize /: as the beginning of a regex,
    which causes highlighting to abort.
  • Note: /:, +:, are still not considered symbols

This solves the problem by making the pattern /: \d+ an exceptional case that is
never treated as a regex. For most cases, most of the time this should be a win - as in the
use of these short functional symbols is much more common than an actual regex that starts with a literal like /: 2 etc.

Resolves #730.

- Do not mistakenly recognize `/:` as the beginning of a regex,
  which causes highlighting to abort.
- `/:`, `+:`, are still not considered symbols

This solves the problem by making the `/: \d` an exception case that is
never treated as a regex.  For most cases, most of the time this should
be a win.

Resolves highlightjs#730.
@joshgoebel joshgoebel added enhancement An enhancement or new feature language labels Feb 17, 2020
@joshgoebel joshgoebel merged commit 3f2b813 into highlightjs:master Feb 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement An enhancement or new feature language
Projects
None yet
Development

Successfully merging this pull request may close these issues.

(elixir) interpolation, sigils and / functions
2 participants