From 083a32eb2ef976b0c1531e85d0557ecade8f7de5 Mon Sep 17 00:00:00 2001 From: itsmattkc <34096995+itsmattkc@users.noreply.github.com> Date: Wed, 24 Aug 2022 12:20:50 -0700 Subject: [PATCH] html: write block format --- app/common/html.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/app/common/html.cpp b/app/common/html.cpp index 1b58418fa..b8c08fb26 100644 --- a/app/common/html.cpp +++ b/app/common/html.cpp @@ -161,7 +161,7 @@ void Html::WriteBlock(QXmlStreamWriter *writer, const QTextBlock &block) WriteCSSProperty(&style, QStringLiteral("line-height"), QStringLiteral("%1%").arg(fmt.lineHeight())); } - //WriteCharFormat(&style, block.charFormat()); + WriteCharFormat(&style, block.charFormat()); if (!style.isEmpty()) { writer->writeAttribute(QStringLiteral("style"), style); @@ -169,12 +169,7 @@ void Html::WriteBlock(QXmlStreamWriter *writer, const QTextBlock &block) auto it = block.begin(); - if (it == block.end()) { - // FIXME: Might not be necessary with our custom HTML implementation - QString s; - s.append(QChar::Nbsp); - writer->writeCharacters(s); - } else { + if (it != block.end()) { for (; it!=block.end(); it++) { WriteFragment(writer, it.fragment()); }