Fix the parsing of the chat cache so the lists are no longer broken and add tests.

This commit is contained in:
James Graham
2026-02-25 18:25:55 +00:00
parent 7f91c57945
commit c08693c508
3 changed files with 58 additions and 1 deletions

View File

@@ -53,7 +53,6 @@ inline QString trim(QString string)
QString CacheItem::toString() const
{
auto newText = trim(content.toMarkdown(QTextDocument::MarkdownDialectGitHub));
newText.replace(QRegularExpression(u"(?<!\n)\n(?!\n)"_s), u" "_s);
if (type == MessageComponentType::Quote) {
newText = formatQuote(newText);
} else if (type == MessageComponentType::Code) {