Closed
Description
Information
- Language: C++
- Plugins: none
Description
PrismJS cannote highlight the class name in C++.
class MainWindow : public QMainWindow
, in this example,MainWindow
andQMainWindow
are both class names. Prism does not highlight theQMainWindow
.void MainWindow::changeWindowTitle()
, in this example,MainWindow
is a class name but PrismJS doesn't highlight it.
P.S.: You needn't care the
slots
/Q_OBJECT
... Just refer to the GitHub approach
GitHub can highlight them well. You can see the code below:
Code snippet
The code being highlighted incorrectly.
class MainWindow : public QMainWindow
{
Q_OBJECT
private slots:
void changeWindowTitle();
};
void MainWindow::changeWindowTitle()
{
setWindowTitle(plainTextEdit->currentFile.split("/").last() + " - Notepanda");
}