Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BUG: C++ code highlight #2347

Closed
ChungZH opened this issue Apr 30, 2020 · 0 comments · Fixed by #2348
Closed

BUG: C++ code highlight #2347

ChungZH opened this issue Apr 30, 2020 · 0 comments · Fixed by #2348

Comments

@ChungZH
Copy link

ChungZH commented Apr 30, 2020

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");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants