JS Regexp engine does not support posessive qualifiers, fix link regexp another way

This commit is contained in:
Ben Gotow 2019-07-26 12:15:38 -05:00
parent a8dd37217b
commit e2bdf45b68

View file

@ -162,12 +162,13 @@ const RegExpUtils = {
'(', '(',
// URL components // URL components
// (last character must not be puncation, hence two groups) // (last character must not be puncation, hence two groups)
'(?:[\\+=~%\\/\\.\\w\\-_@]*[\\+~%\\/\\w\\-:_]+)?', '(?:[\\+=~%\\/\\.\\w\\-_@]*[\\+~%\\/\\w\\-:_])?',
// optionally followed by: a query string and/or a #location // optionally followed by: a query string and/or a #location
// (last character must not be puncation, hence two groups) // (last character must not be puncation, hence two groups)
"(?:(\\?[\\-\\+=&;%@\\.\\w_\\#]*[\\#\\-\\+=&;%@\\w_\\/]+)?#?(?:['\\$\\&\\(\\)\\*\\+,;=\\.\\!\\/\\\\\\w%-?]*[\\/\\\\\\w]+)?)?", "(?:\\?[\\-\\+=&;:%@$\\(\\)'\\*\\/~\\!\\.,\\w_]*[\\-\\+=&;~%@\\w_\\/])?",
')?+', "(?:#['\\$\\&\\(\\)\\*\\+,;=\\.\\!\\/\\\\\\w%-?]*[\\/\\\\\\w])?",
')?',
')', ')',
]; ];
if (matchStartOfString) { if (matchStartOfString) {