Commit 7976ed87 authored by Leander Schulten's avatar Leander Schulten

CodeEditorHelper: Fix Highlighting of multiple Strings in a line

parent 6a4584c9
......@@ -77,7 +77,7 @@ CodeHighlighter::CodeHighlighter(QTextDocument * parent):QSyntaxHighlighter (par
multiLineCommentFormat.setForeground(Qt::red);
quotationFormat.setForeground(Qt::darkGreen);
rule.pattern = QRegularExpression("\".*\"");
rule.pattern = QRegularExpression("\"(?:[^\"\\\\]|\\\\.)*\""); // js: /"(?:[^"\\]|\\.)*"/
rule.format = quotationFormat;
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