mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-11-10 17:48:50 +08:00
JS Regexp engine does not support posessive qualifiers, fix link regexp another way
This commit is contained in:
parent
a8dd37217b
commit
e2bdf45b68
1 changed files with 4 additions and 3 deletions
|
@ -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) {
|
||||||
|
|
Loading…
Reference in a new issue