Handle single quotes for links

Make sure that the text handler can handle links which use single or double quotes for the attributes.
This commit is contained in:
James Graham
2023-03-19 19:06:08 +00:00
parent 3cc8d32dd3
commit ee254a286d
3 changed files with 16 additions and 7 deletions

View File

@@ -13,6 +13,7 @@
namespace TextRegex
{
static const QRegularExpression endTagType{QStringLiteral("(>| )")};
static const QRegularExpression attributeData{QStringLiteral("['\"](.*?)['\"]")};
static const QRegularExpression removeReply{QStringLiteral("> <.*?>.*?\\n\\n"), QRegularExpression::DotMatchesEverythingOption};
static const QRegularExpression removeRichReply{QStringLiteral("<mx-reply>.*?</mx-reply>"), QRegularExpression::DotMatchesEverythingOption};
static const QRegularExpression codePill{QStringLiteral("<pre><code[^>]*>(.*?)</code></pre>"), QRegularExpression::DotMatchesEverythingOption};