Do not format immediates inside string literals in RV syntax highlighter
... Apart from the string formatting itself
MODIFY
src/editor/rvsyntaxhighlighter.cpp
src/editor/rvsyntaxhighlighter.cpp
@@ -44,12 +44,6 @@ RVSyntaxHighlighter::RVSyntaxHighlighter(QTextDocument* parent, std::shared_ptr<
rule.format = labelFormat;
m_highlightingRules.append(rule);
- // Strings
- stringFormat.setForeground(QColor{0x80, 0x00, 0x00});
- rule.pattern = QRegularExpression(R"("(?:[^"]|\.)*")");
- rule.format = stringFormat;
- m_highlightingRules.append(rule);
-
// Immediates
immediateFormat.setForeground(QColorConstants::DarkGreen);
rule.pattern = QRegularExpression("\\b(?<![A-Za-z])[-+]?\\d+");
@@ -60,6 +54,12 @@ RVSyntaxHighlighter::RVSyntaxHighlighter(QTextDocument* parent, std::shared_ptr<
rule.pattern = QRegularExpression("([-+]?0[xX][0-9a-fA-F]+|[-+]?0[bB][0-1]+)");
m_highlightingRules.append(rule);
+ // Strings
+ stringFormat.setForeground(QColor{0x80, 0x00, 0x00});
+ rule.pattern = QRegularExpression(R"("(?:[^"]|\.)*")");
+ rule.format = stringFormat;
+ m_highlightingRules.append(rule);
+
// Comments
commentFormat.setForeground(Colors::Medalist);
rule.pattern = QRegularExpression("[#]+.*");

Do not format immediates inside string literals in RV syntax highlighter

... Apart from the string formatting itself