Fix missing character before a Matrix ID
When you send messages like "a @blankeclair:catgirl.cloud b" or "]#rainversewiki:catgirl.cloud", they would be rendered like "a@blankeclair:catgirl.cloud b" and "#rainversewiki:catgirl.cloud" respectively. This commit fixes that by not matching the character before the MXID in the regex.
This commit is contained in:
committed by
Tobias Fella
parent
f7533a454c
commit
30e24069bc
@@ -80,6 +80,6 @@ static const QRegularExpression
|
||||
QRegularExpression::CaseInsensitiveOption | QRegularExpression::UseUnicodePropertiesOption);
|
||||
static const QRegularExpression emailAddress(QStringLiteral(R"(<a.*?<\/a>(*SKIP)(*F)|\b(mailto:)?((\w|\.|-)+@(\w|\.|-)+\.\w+\b))"),
|
||||
QRegularExpression::CaseInsensitiveOption | QRegularExpression::UseUnicodePropertiesOption);
|
||||
static const QRegularExpression mxId(QStringLiteral(R"((^|[][[:space:](){}`'";])([!#@][-a-z0-9_=#/.]{1,252}:\w(?:\w|\.|-)*\.\w+(?::\d{1,5})?))"),
|
||||
static const QRegularExpression mxId(QStringLiteral(R"((?<=^|[][[:space:](){}`'";])([!#@][-a-z0-9_=#/.]{1,252}:\w(?:\w|\.|-)*\.\w+(?::\d{1,5})?))"),
|
||||
QRegularExpression::CaseInsensitiveOption | QRegularExpression::UseUnicodePropertiesOption);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user