From ff3ef5049e1a8fd963669bdbbae451f24a824dc6 Mon Sep 17 00:00:00 2001 From: "Felix (xq) Queißner" Date: Sun, 7 Mar 2021 11:43:32 +0100 Subject: Experiments. --- src/renderers/htmlrenderer.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) (limited to 'src/renderers/htmlrenderer.cpp') diff --git a/src/renderers/htmlrenderer.cpp b/src/renderers/htmlrenderer.cpp index e1cd2da..48f4709 100644 --- a/src/renderers/htmlrenderer.cpp +++ b/src/renderers/htmlrenderer.cpp @@ -219,7 +219,16 @@ static void renderRecursive(RenderState & state, GumboNode const & node, int nes case GUMBO_TAG_LI: { break; } + case GUMBO_TAG_BLOCKQUOTE: { + QTextTable *table = cursor.insertTable(1, 1,text_style.blockquote_tableformat); + cursor.setBlockFormat(text_style.blockquote_format); + QTextTableCell cell = table->cellAt(0, 0); + cell.setFormat(text_style.blockquote); + cursor.setCharFormat(text_style.blockquote); + + break; + } // Text modification elements: case GUMBO_TAG_SPAN: { @@ -257,20 +266,9 @@ static void renderRecursive(RenderState & state, GumboNode const & node, int nes auto fmt = text_style.standard_link; fmt.setAnchor(true); fmt.setAnchorHref(QString::fromUtf8(anchor)); - cursor.setBlockFormat(text_style.link_format); cursor.setCharFormat(fmt); break; } - case GUMBO_TAG_BLOCKQUOTE: { - QTextTable *table = cursor.insertTable(1, 1,text_style.blockquote_tableformat); - cursor.setBlockFormat(text_style.blockquote_format); - QTextTableCell cell = table->cellAt(0, 0); - cell.setFormat(text_style.blockquote); - - cursor.setCharFormat(text_style.blockquote); - - break; - } default: qDebug() << "unhandled tag:" << gumbo_normalized_tagname(element.tag); break; -- cgit v1.2.3