Commit 8e8b3978 authored by Ahmad Samir's avatar Ahmad Samir
Browse files

Make UrlFilter::CompleteUrlRegExp match case-insensitively

Since it uses the pattern of UrlFilter::FullUrlRegExp, which should match
case-insensitively.
parent 65d5d45c
......@@ -68,7 +68,7 @@ const QRegularExpression UrlFilter::FullUrlRegExp(
+ LS1(query)
+ LS1(fragment)
, QRegularExpression::CaseInsensitiveOption);
/* clang-format on */
/////////////////////////////////////////////
......@@ -77,9 +77,11 @@ const QRegularExpression UrlFilter::FullUrlRegExp(
const QRegularExpression UrlFilter::EmailAddressRegExp(QStringLiteral("\\b(\\w|\\.|-|\\+)+@(\\w|\\.|-)+\\.\\w+\\b"));
// matches full url or email address
const QRegularExpression UrlFilter::CompleteUrlRegExp(QLatin1Char('(') + FullUrlRegExp.pattern() + QLatin1Char('|') + EmailAddressRegExp.pattern()
+ QLatin1Char(')'));
const QRegularExpression UrlFilter::CompleteUrlRegExp(
QLatin1Char('(') + FullUrlRegExp.pattern() + QLatin1Char('|') + EmailAddressRegExp.pattern()+ QLatin1Char(')'),
QRegularExpression::CaseInsensitiveOption);
/* clang-format on */
UrlFilter::UrlFilter()
{
setRegExp(CompleteUrlRegExp);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment