diff options
| author | Felix (xq) Queißner <git@mq32.de> | 2021-03-07 11:43:32 +0100 |
|---|---|---|
| committer | Felix Queißner <felix@ib-queissner.de> | 2021-03-08 02:23:16 +0100 |
| commit | ff3ef5049e1a8fd963669bdbbae451f24a824dc6 (patch) | |
| tree | dc3bfb2dedb1eeae85ca4bdce6ae144591749d22 /src/renderers/htmlrenderer.cpp | |
| parent | 64e271dce2e5aca07abdca8e335b3f7cb9ba1114 (diff) | |
| download | kristall-ff3ef5049e1a8fd963669bdbbae451f24a824dc6.tar.gz | |
Experiments.
Diffstat (limited to 'src/renderers/htmlrenderer.cpp')
| -rw-r--r-- | src/renderers/htmlrenderer.cpp | 20 |
1 files changed, 9 insertions, 11 deletions
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; |
