diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-11 11:16:42 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2019-06-11 11:16:42 +0200 |
commit | 4e875d988e99df57c439f481e258e2138fdb9410 (patch) | |
tree | 15f79917b0e303445976028cb541668a1ebb67f1 /src/gui/text/qtexthtmlparser.cpp | |
parent | 6e42979518aa0697ff31706616ddbc05486f1864 (diff) | |
parent | 3e75c2965c96fa014ab74121e84d623fd04a27f7 (diff) |
Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: Ieb8efee9d74229b9f141ec715e3a9557586b51e8
Diffstat (limited to 'src/gui/text/qtexthtmlparser.cpp')
-rw-r--r-- | src/gui/text/qtexthtmlparser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gui/text/qtexthtmlparser.cpp b/src/gui/text/qtexthtmlparser.cpp index 49ee6394ee..642f0893b4 100644 --- a/src/gui/text/qtexthtmlparser.cpp +++ b/src/gui/text/qtexthtmlparser.cpp @@ -1635,6 +1635,10 @@ void QTextHtmlParser::applyAttributes(const QStringList &attributes) else if (key == QLatin1String("type")) linkType = value; break; + case Html_pre: + if (key == QLatin1String("class") && value.startsWith(QLatin1String("language-"))) + node->blockFormat.setProperty(QTextFormat::BlockCodeLanguage, value.mid(9)); + break; default: break; } |