diff options
Diffstat (limited to 'src/renderers')
| -rw-r--r-- | src/renderers/geminirenderer.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/renderers/geminirenderer.cpp b/src/renderers/geminirenderer.cpp index 09ff494..be702e4 100644 --- a/src/renderers/geminirenderer.cpp +++ b/src/renderers/geminirenderer.cpp @@ -66,6 +66,15 @@ std::unique_ptr<GeminiDocument> GeminiRenderer::render( { if (line.startsWith("```")) { + // Set the last line of the preformatted block to have + // standard line height. + QTextBlockFormat fmt = text_style.preformatted_format; + fmt.setLineHeight(themed_style.line_height_p, + QTextBlockFormat::LineDistanceHeight); + cursor.movePosition(QTextCursor::PreviousBlock); + cursor.setBlockFormat(fmt); + + cursor.movePosition(QTextCursor::NextBlock); cursor.setBlockFormat(text_style.standard_format); verbatim = false; } |
