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

reST (reStructuredText) language can crash the browser #1984

Closed
nathf opened this issue Jul 17, 2019 · 0 comments · Fixed by #1986
Closed

reST (reStructuredText) language can crash the browser #1984

nathf opened this issue Jul 17, 2019 · 0 comments · Fixed by #1986

Comments

@nathf
Copy link

nathf commented Jul 17, 2019

Information:

  • Prism version: 1.16.0
  • Environment: Browser, reproducible in Chrome (Version 75.0.3770.142 (Official Build) (64-bit)) & Firefox v67.0.4 - Build: 20190619235627

Does the latest version of Prism from the download page also have this issue? Yes

Description
On https://prismjs.com/test.html
Using the input string of

12345678901234567890123456897987987689567858756785765765675:a_a___

Then selecting the language reST (reStructuredText) causes the browser tab to hang, which I think is caused by:

pattern: /(?:\b[a-z\d](?:[_.:+]?[a-z\d]+)*_?_|`[^`]+`_?_|_`[^`]+`)(?=[\s\-.,:;!?\\\/'")\]}]|$)/i,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants