Fix line strike.

Fix code block wrapping.
Fix replyModel being garbage collected.
Reply message in RoomPanelInput is richtext now.
This commit is contained in:
Black Hat
2019-09-29 20:29:59 -07:00
parent 887f69fac3
commit 617855a780
11 changed files with 131 additions and 42 deletions

View File

@@ -19,13 +19,12 @@ static const QRegularExpression removeReplyRegex{
static const QRegularExpression removeRichReplyRegex{
"<mx-reply>.*?</mx-reply>", QRegularExpression::DotMatchesEverythingOption};
static const QRegularExpression codePillRegExp{
"<pre>(.*?)</pre>", QRegularExpression::DotMatchesEverythingOption};
"<pre><code[^>]*>(.*?)</code></pre>", QRegularExpression::DotMatchesEverythingOption};
static const QRegularExpression userPillRegExp{
"<a href=\"https://matrix.to/#/@.*?:.*?\">(.*?)</a>",
QRegularExpression::DotMatchesEverythingOption};
QString removeReply(const QString& text);
QString cleanHTML(const QString& text);
static const QRegularExpression strikethroughRegExp{
"<del>(.*?)</del>", QRegularExpression::DotMatchesEverythingOption};
} // namespace utils
#endif