1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-18 12:52:42 +01:00

Update JsShrink external library.

Summary: It seems that there was a [[17cbfacae6 | recent-ish commit]] to the `JsShrink` external library. I'm not sure what this commit actually achieves, but we may as well bring it upstream.

Test Plan: Eyeball it.

Reviewers: vrana, epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: epriestley, Korvin

Differential Revision: https://secure.phabricator.com/D9414
This commit is contained in:
Joshua Spence 2014-06-07 11:26:20 -07:00 committed by epriestley
parent 0a534d1d1f
commit dd796a44b6

View file

@ -13,7 +13,11 @@ function jsShrink($input) {
(?:
(^|[-+\([{}=,:;!%^&*|?~]|/(?![/*])|return|throw) # context before regexp
(?:\s|//[^\n]*+\n|/\*(?:[^*]|\*(?!/))*+\*/)* # optional space
(/(?![/*])(?:\\\\[^\n]|[^[\n/\\\\]|\[(?:\\\\[^\n]|[^]])++)+/) # regexp
(/(?![/*])(?:
\\\\[^\n]
|[^[\n/\\\\]++
|\[(?:\\\\[^\n]|[^]])++
)+/) # regexp
|(^
|\'(?:\\\\.|[^\n\'\\\\])*\'
|"(?:\\\\.|[^\n"\\\\])*"