Merge pull request #1604 from thelounge/greenkeeper/urijs-1.19.0

Update urijs to the latest version 🚀
This commit is contained in:
Pavel Djundik 2017-10-06 10:15:42 +03:00 committed by GitHub
commit 530d71764f
2 changed files with 34 additions and 30 deletions

View File

@ -22,6 +22,7 @@ function findLinks(text) {
// <a>-Tags. // <a>-Tags.
// See https://medialize.github.io/URI.js/docs.html#static-withinString // See https://medialize.github.io/URI.js/docs.html#static-withinString
// In our case, we store each URI encountered in a result array. // In our case, we store each URI encountered in a result array.
try {
URI.withinString(text, function(url, start, end) { URI.withinString(text, function(url, start, end) {
let parsedScheme; let parsedScheme;
@ -57,6 +58,9 @@ function findLinks(text) {
link: url link: url
}); });
}); });
} catch (e) {
// withinString is wrapped in a try/catch due to https://github.com/medialize/URI.js/issues/359
}
return result; return result;
} }

View File

@ -60,7 +60,7 @@
"socket.io": "1.7.4", "socket.io": "1.7.4",
"spdy": "3.4.7", "spdy": "3.4.7",
"ua-parser-js": "0.7.14", "ua-parser-js": "0.7.14",
"urijs": "1.18.12", "urijs": "1.19.0",
"web-push": "3.2.3" "web-push": "3.2.3"
}, },
"devDependencies": { "devDependencies": {