Fix markdown helper test

This commit is contained in:
James Graham
2026-02-14 16:00:46 +00:00
parent 0341da5868
commit c554c40b3b
3 changed files with 11 additions and 0 deletions

View File

@@ -70,6 +70,7 @@ TestCase {
{tag: "heading 5", input: "##### h", outText: ["#", "##", "###", "####", "#####", "##### ", "h"], outFormats: [[], [], [], [], [], [], [RichFormat.Bold, RichFormat.Heading5]], unhandled: 0},
{tag: "heading 6", input: "###### h", outText: ["#", "##", "###", "####", "#####", "######", "###### ", "h"], outFormats: [[], [], [], [], [], [] ,[], [RichFormat.Bold, RichFormat.Heading6]], unhandled: 0},
{tag: "quote", input: "> q", outText: [">", "> ", "q"], outFormats: [[], [], []], unhandled: 1},
{tag: "quote - no space", input: ">q", outText: [">", "q"], outFormats: [[], [], []], unhandled: 1},
{tag: "unorderedlist 1", input: "* l", outText: ["*", "* ", "l"], outFormats: [[], [], [RichFormat.UnorderedList]], unhandled: 0},
{tag: "unorderedlist 2", input: "- l", outText: ["-", "- ", "l"], outFormats: [[], [], [RichFormat.UnorderedList]], unhandled: 0},
{tag: "orderedlist 1", input: "1. l", outText: ["1", "1.", "1. ", "l"], outFormats: [[], [], [], [RichFormat.OrderedList]], unhandled: 0},

View File

@@ -50,6 +50,10 @@ const QList<MarkdownSyntax> syntax = {
MarkdownSyntax{.sequence = " >"_L1, .lineStart = true, .format = RichFormat::Quote},
MarkdownSyntax{.sequence = " >"_L1, .lineStart = true, .format = RichFormat::Quote},
MarkdownSyntax{.sequence = " >"_L1, .lineStart = true, .format = RichFormat::Quote},
MarkdownSyntax{.sequence = "> "_L1, .lineStart = true, .format = RichFormat::Quote},
MarkdownSyntax{.sequence = " > "_L1, .lineStart = true, .format = RichFormat::Quote},
MarkdownSyntax{.sequence = " > "_L1, .lineStart = true, .format = RichFormat::Quote},
MarkdownSyntax{.sequence = " > "_L1, .lineStart = true, .format = RichFormat::Quote},
MarkdownSyntax{.sequence = "* "_L1, .lineStart = true, .format = RichFormat::UnorderedList},
MarkdownSyntax{.sequence = " * "_L1, .lineStart = true, .format = RichFormat::UnorderedList},
MarkdownSyntax{.sequence = " * "_L1, .lineStart = true, .format = RichFormat::UnorderedList},

View File

@@ -113,6 +113,12 @@ void EventMessageContentModel::initializeModel()
}
});
#if Quotient_VERSION_MINOR > 9
connect(m_room, &Room::newThread, this, [this](const QString &newThread) {
if (newThread == m_eventId) {
resetContent();
}
});
#elif Quotient_VERSION_MINOR == 9 && Quotient_VERSION_PATCH >= 4
connect(m_room, &Room::newThread, this, [this](const Thread &newThread) {
if (newThread.threadRootId == m_eventId) {
resetContent();