Skip to content

Commit

Permalink
fix(javascript) final solid fix for runaway regex
Browse files Browse the repository at this point in the history
  • Loading branch information
joshgoebel committed Nov 12, 2020
1 parent 6dba507 commit 35a7333
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/languages/javascript.js
Expand Up @@ -256,9 +256,7 @@ export default function(hljs) {
regex.lookahead(regex.concat(
// we also need to allow for multiple possible comments inbetween
// the first key:value pairing
/(\/\/.*$)*/,
/(\/\*(.|\n)*\*\/)*/,
/\s*/,
/(((\/\/.*$)|(\/\*(\*[^/]|[^*])*\*\/))\s*)*/,
IDENT_RE + '\\s*:'))),
relevance: 0,
contains: [
Expand Down

0 comments on commit 35a7333

Please sign in to comment.