Skip to content

BUG: C++ code highlight #2347

Closed
Closed
@ChungZH

Description

Information

  • Language: C++
  • Plugins: none

Description
PrismJS cannote highlight the class name in C++.

  1. class MainWindow : public QMainWindow, in this example, MainWindow and QMainWindow are both class names. Prism does not highlight the QMainWindow.
  2. void MainWindow::changeWindowTitle(), in this example, MainWindow is a class name but PrismJS doesn't highlight it.

image

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");
}

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions