Closed magiclen closed 4 years ago
I found the following JS texts which could cause panic,
0.0.35
console.log(/MSIE|Trident|Edge/.test(window.navigator.userAgent));
>= 0.0.32 <=0.0.34
function (i, n, a) { i[n].type.replace(/ *;(.|\s)*/,"")===t&&a.push(i[n].MathJax.elementJax);return a}
However, the code below can be minified without panicking, (only add a space character after ===
)
function (i, n, a) { i[n].type.replace(/ *;(.|\s)*/,"")=== t&&a.push(i[n].MathJax.elementJax);return a}
Thanks for the detailed report! I'll try to fix it in the next days.
I've found this crate will cause panic when minifying some JS text (not sure what exactly causes the panic, and maybe it only happens after version
0.0.32
). Here I usehttps://code.jquery.com/jquery-3.4.1.slim.min.js
for example.To reproduce,
Cargo.toml
main.rs