Commit ca96056b authored by Leander Schulten's avatar Leander Schulten

CodeEditorHelper: Fix Highlighting of functions. for(...) if(...) while(...)...

CodeEditorHelper: Fix Highlighting of functions. for(...) if(...) while(...) is not highlighted as function
parent 7976ed87
Pipeline #272900 passed with stage
in 14 minutes and 12 seconds
......@@ -83,7 +83,7 @@ CodeHighlighter::CodeHighlighter(QTextDocument * parent):QSyntaxHighlighter (par
functionFormat.setFontItalic(true);
functionFormat.setForeground(Qt::blue);
rule.pattern = QRegularExpression("\\b[A-Za-z0-9_]+(?=\\()");
rule.pattern = QRegularExpression("\\b(?!(for|while|if))[A-Za-z0-9_]+\b*(?=\\()");
rule.format = functionFormat;
highlightingRules.append(rule);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment