diff --git a/src/Utils.cpp b/src/Utils.cpp index 06df59df..5ae1776f 100644 --- a/src/Utils.cpp +++ b/src/Utils.cpp @@ -19,7 +19,6 @@ #include #include -#include #include #include @@ -524,8 +523,7 @@ utils::markdownToHtml(const QString &text, bool rainbowify) while ((boundaryEnd = tbf.toNextBoundary()) != -1) { // Split text to get current char auto curChar = - qNodeText.mid(boundaryStart, boundaryEnd - boundaryStart) - .toStdString(); + qNodeText.mid(boundaryStart, boundaryEnd - boundaryStart); boundaryStart = boundaryEnd; // Don't rainbowify spaces if (curChar == " ") { @@ -538,9 +536,10 @@ utils::markdownToHtml(const QString &text, bool rainbowify) // format color for HTML auto colorString = color.name(QColor::NameFormat::HexRgb); // create HTML element for current char - auto curCharColored = fmt::format("{}", - colorString.toStdString(), - curChar); + auto curCharColored = QString("%1") + .arg(colorString) + .arg(curChar) + .toStdString(); // append colored HTML element to buffer buf.append(curCharColored);