Use a (hopefully) more efficient regex for matching jquery in the safelist (#42653)

This commit is contained in:
Wesley Wigham
2021-02-04 13:53:05 -08:00
committed by GitHub
parent 62bc8bec4e
commit f569aa3832

View File

@@ -207,7 +207,7 @@ namespace ts.server {
const defaultTypeSafeList: SafeList = {
"jquery": {
// jquery files can have names like "jquery-1.10.2.min.js" (or "jquery.intellisense.js")
match: /jquery(-(\.?\d+)+)?(\.intellisense)?(\.min)?\.js$/i,
match: /jquery(-[\d\.]+)?(\.intellisense)?(\.min)?\.js$/i,
types: ["jquery"]
},
"WinJS": {