mirror of
https://github.com/thelounge/thelounge
synced 2024-11-10 22:54:15 +00:00
Remove URI.js monkey-patch as fix landed in v1.18.5
See https://github.com/medialize/URI.js/issues/325
This commit is contained in:
parent
03e3444a35
commit
fa1aecdd9e
1 changed files with 0 additions and 7 deletions
|
@ -17,19 +17,12 @@ const commonSchemes = [
|
|||
|
||||
function findLinks(text) {
|
||||
let result = [];
|
||||
let lastPosition = 0;
|
||||
|
||||
// URI.withinString() identifies URIs within text, e.g. to translate them to
|
||||
// <a>-Tags.
|
||||
// See https://medialize.github.io/URI.js/docs.html#static-withinString
|
||||
// In our case, we store each URI encountered in a result array.
|
||||
URI.withinString(text, function(url, start, end) {
|
||||
// v-- fix: url was modified and does not match input string -> cant be mapped
|
||||
if (text.indexOf(url, lastPosition) < 0) {
|
||||
return;
|
||||
}
|
||||
// ^-- /fix: url was modified and does not match input string -> cant be mapped
|
||||
|
||||
// Extract the scheme of the URL detected, if there is one
|
||||
const parsedScheme = URI(url).scheme().toLowerCase();
|
||||
|
||||
|
|
Loading…
Reference in a new issue