Commit 42757745 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Fix tab support

parent 4e841f1d
......@@ -45,7 +45,7 @@ void TextHTMLBuilderTest::testHtmlWithTab()
auto result = hb->getResult();
auto regex = QRegularExpression(
QStringLiteral("^<p>Foo</p>\\n<p>&nbsp;<p>&nbsp;<p>Bar</p>\\n$"));
QStringLiteral("^<p>&nbsp;<p>&nbsp;&nbsp;&nbsp; foo</p>\\n$"));
const bool regexpHasResult = regex.match(result).hasMatch();
if (!regexpHasResult) {
......
......@@ -477,6 +477,9 @@ void TextHTMLBuilder::appendLiteralText(const QString &text)
textEscapedResult += c;
}
}
} else if (c == QLatin1Char('\t')) {
//TODO fixme ?
textEscapedResult += QStringLiteral("&nbsp;&nbsp;&nbsp; ");
} else {
textEscapedResult += c;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment