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

JS: Better regex detection #2158

Merged
merged 2 commits into from Jan 5, 2020

Conversation

RunDevelopment
Copy link
Member

This fixes some of the issues addressed in #2154.

The changes I made can be summed up as:

  1. Regexes can now be followed by a :.
  2. There can be any number of spaces and comments between the regex and what comes after. But only multiline comments because single-line comments are always followed by either a newline or the EOF which both are accepting.

I just want to point out, that I cannot add this comment or whitespace regex to the lookbehind because JS comment cannot be parsed in RTL direction.

@RunDevelopment RunDevelopment merged commit a23d8f8 into PrismJS:master Jan 5, 2020
@RunDevelopment RunDevelopment deleted the js-regex-detection branch January 5, 2020 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants