Improved 'twitchChannelRegex' regexp.

This commit is contained in:
23rd 2018-10-13 17:32:01 +03:00 committed by pajlada
parent bd04aa0074
commit 3e268637f0

View file

@ -1257,7 +1257,7 @@ void ChannelView::addContextMenuItems(
// Open in new split. // Open in new split.
if (hoveredElement->getLink().type == Link::Url) { if (hoveredElement->getLink().type == Link::Url) {
static QRegularExpression twitchChannelRegex( static QRegularExpression twitchChannelRegex(
R"(^(?:https?:\/\/)?(?:www\.|go\.)?twitch\.tv\/(?<username>[a-z0-9_]+))", R"(^(?:https?:\/\/)?(?:www\.|go\.)?twitch\.tv\/(?<username>[a-z0-9_]{3,}))",
QRegularExpression::CaseInsensitiveOption); QRegularExpression::CaseInsensitiveOption);
static QSet<QString> ignoredUsernames{ static QSet<QString> ignoredUsernames{
"videos", "videos",