Fix match linking (#608)

Right now it's matching links even if they have garbage text infront of it. For example, `sahttp://www.google.com`

This change fixes that.
This commit is contained in:
Lajamerr Mittesdine 2018-07-12 12:56:08 -04:00 committed by fourtf
parent 5757a6a761
commit 12a21b7b1a

View file

@ -29,6 +29,7 @@ LinkParser::LinkParser(const QString &unparsedString)
"(?:[-\\w$\\.+!*'(),]+|%[a-fA-F0-9]{2})+)))" "(?:[-\\w$\\.+!*'(),]+|%[a-fA-F0-9]{2})+)))"
// If nothing matches then just go on // If nothing matches then just go on
"|" "|"
"^"
// Identifier for http and ftp // Identifier for http and ftp
"(?:(?:https?|ftps?)://)?" "(?:(?:https?|ftps?)://)?"
// user:pass authentication // user:pass authentication