Skip to content

Commit 37b9c9a

Browse files
PHP: Fixed exponential backtracking (#2684)
1 parent 89f1e18 commit 37b9c9a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Diff for: components/prism-php.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -303,7 +303,7 @@
303303
return;
304304
}
305305

306-
var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*[\s\S]*?(?:\*\/|$))*?(?:\?>|$)/ig;
306+
var phpPattern = /<\?(?:[^"'/#]|\/(?![*/])|("|')(?:\\[\s\S]|(?!\1)[^\\])*\1|(?:\/\/|#(?!\[))(?:[^?\n\r]|\?(?!>))*(?=$|\?>|[\r\n])|#\[|\/\*(?:[^*]|\*(?!\/))*(?:\*\/|$))*?(?:\?>|$)/ig;
307307
Prism.languages['markup-templating'].buildPlaceholders(env, 'php', phpPattern);
308308
});
309309

Diff for: components/prism-php.min.js

+1-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)