Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
None
-
None
-
None
-
Browsers:
Firefox 53.0.2 (32-bit)
Google Chrome Version 58.0.3029.96 (64-bit)
Description
It seems that the syntaxhighlight configuration in the wiki software has changed so that the '<code>' tag no longer defaults to <syntaxhighlight lang="cpp-qt">. (see Wiki Editing Hints - 9. Code highlighting)
This affects a lot of pages on wiki.qt.io where the <code> tag has been used, mangling the formatting of these pages.
One has to now explicitly use the <syntaxhighlight lang="cpp-qt"> tag to make it work again.
<code lang="Some lang"> does not work either. '<code>' is just interpreted as a normal html code tag apparently.
Example:
From How to Use QSettings (Old revision with <code>):
<code> #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> ... class MainWindow : public QMainWindow { Q_OBJECT public: ... </code>
See attached screenshot "How to Use QSettings - Old revision using code.jpg" for resulting browser display. (Note how the formatting is mangled.)
Does not syntaxhighlight as promised on Wiki Editing Hints - 9. Code highlighting
... The wiki uses the standard GeSHi syntax highlighter. The only customisation made, has been to add the <code> tag to the highlighted list handled by GeSHi. The default language is set to C++/Qt toolkit. You can change the language with the lang="" attribute. ...
If you change the tag '<code>' to '<syntaxhighlight lang="cpp-qt">' it works as expected.
From How to Use QSettings (New revision, edit by me, using <syntaxhighlight lang="cpp-qt">):
<syntaxhighlight lang="cpp-qt"> #ifndef MAINWINDOW_H #define MAINWINDOW_H #include <QMainWindow> ... class MainWindow : public QMainWindow { Q_OBJECT public: ... </syntaxhighlight>
See attached screenshot "How to Use QSettings - New revision using syntaxhighlight lang=cpp-qt.jpg" for resulting browser display.