Add somewhat better blockquote styling

Quotes are now "quoted" and also have a different background.
This commit is contained in:
Joshua Goins
2023-11-03 17:34:52 -04:00
parent e3cf85aa8c
commit dc6b539ddf
3 changed files with 18 additions and 0 deletions

View File

@@ -134,6 +134,10 @@ QString TextHandler::handleRecieveRichText(Qt::TextFormat inputFormat, const Neo
nextTokenType();
}
// Apply user style to blockquotes
// Unfortunately some attributes can be only be used on table cells, so we need to wrap the content in one.
outputString.replace(TextRegex::blockQuote, QStringLiteral(R"(<blockquote><table><tr><td>“\1”</td></tr></table></blockquote>)"));
// If the message is an emote add the user pill to the front of the message.
if (event != nullptr) {
auto e = eventCast<const Quotient::RoomMessageEvent>(event);