Skip to content

fix(js) prevent long series of ///// from freezing #2657

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

Merged
merged 3 commits into from
Aug 21, 2020

Conversation

joshgoebel
Copy link
Member

Resolves #2656.

@joshgoebel joshgoebel added this to the 10.2 milestone Aug 17, 2020
Copy link
Member

@allejo allejo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can confirm this fixes the problem and doesn't seem to have any side effects 👍

However, can you please explain how this fixes the problem?

@taufik-nurrohman
Copy link
Member

taufik-nurrohman commented Aug 18, 2020

The $ part is to mark the end of line. It can be resolved this way too:

(\/\/[^\n]*)

@joshgoebel
Copy link
Member Author

@allejo https://regular-expressions.mobi/catastrophic.html?wlr=1

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.

Performance: Hard performance hit when highlighting JavaScript with banner-comment
3 participants