Skip to content

Commit

Permalink
Removed anchored pattern for email and url. URL underlining is now wo…
Browse files Browse the repository at this point in the history
…rking like qt5.
  • Loading branch information
doug1234 committed Apr 15, 2024
1 parent 75fa735 commit a760241
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/Filter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -470,10 +470,10 @@ void UrlFilter::HotSpot::activate(const QString& actionName)
//regexp matches:
// full url:
// protocolname:// or www. followed by anything other than whitespaces, <, >, ' or ", and ends before whitespaces, <, >, ', ", ], !, comma and dot
const QRegularExpression UrlFilter::FullUrlRegExp(QRegularExpression::anchoredPattern(QLatin1String("(www\\.(?!\\.)|[a-z][a-z0-9+.-]*://)[^\\s<>'\"]+[^!,\\.\\s<>'\"\\]]")));
const QRegularExpression UrlFilter::FullUrlRegExp(QLatin1String("(www\\.(?!\\.)|[a-z][a-z0-9+.-]*://)[^\\s<>'\"]+[^!,\\.\\s<>'\"\\]]"));
// email address:
// [word chars, dots or dashes]@[word chars, dots or dashes].[word chars]
const QRegularExpression UrlFilter::EmailAddressRegExp(QRegularExpression::anchoredPattern(QLatin1String("\\b(\\w|\\.|-)+@(\\w|\\.|-)+\\.\\w+\\b")));
const QRegularExpression UrlFilter::EmailAddressRegExp(QLatin1String("\\b(\\w|\\.|-)+@(\\w|\\.|-)+\\.\\w+\\b"));

// matches full url or email address
const QRegularExpression UrlFilter::CompleteUrlRegExp(QLatin1Char('(')+FullUrlRegExp.pattern()+QLatin1Char('|')+
Expand Down

0 comments on commit a760241

Please sign in to comment.