[Scripts > Strip] Add edge-case workaround for one regex

This commit is contained in:
Ducko 2022-04-20 00:51:18 +01:00
parent dbb9eef558
commit 73ac41967c

View file

@ -22,6 +22,7 @@ const stripCode = (code) => code
.replaceAll('throw ', 'throw~')
.replaceAll('async ', 'async~')
.replaceAll('else ', 'else~')
.replace('/([0-9]+) files/', '/([0-9]+)~files/')
.replaceAll('false', '!1')
.replaceAll('true', '!0')
.replace(/((['"`])[\s\S]*?\2)|[ \n]/g, (_, g1) => g1 || '')