From 55964b6f1d1743c09f5d181c4206b7fc261ea626 Mon Sep 17 00:00:00 2001 From: Brandon Shaw Date: Mon, 12 Jul 2021 08:10:19 -0600 Subject: [PATCH] ui: fix issue where C/C++ keywods could have the syntax highlighting style of a function (issue #1197) (#1199) by moving FUNCTION rule in cpp.rules above KEYWORD rules --- bin/app/data/syntax_highlighting_rules/cpp.rules | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/bin/app/data/syntax_highlighting_rules/cpp.rules b/bin/app/data/syntax_highlighting_rules/cpp.rules index 51084dfc..e043ed76 100644 --- a/bin/app/data/syntax_highlighting_rules/cpp.rules +++ b/bin/app/data/syntax_highlighting_rules/cpp.rules @@ -17,6 +17,10 @@ }, "priority" : true }, + { + "type" : "function", + "patterns" : [ "\\b[A-Za-z0-9_]+(?=\\()" ] + }, { "type" : "keyword", "patterns" : [ @@ -159,12 +163,8 @@ "type" : "number", "patterns" : [ "\\b[0-9]+\\b" ] }, - { - "type" : "function", - "patterns" : [ "\\b[A-Za-z0-9_]+(?=\\()" ] - }, { "type" : "quotation", "patterns" : [ " <[^<>\\s]*>$" ] } -] \ No newline at end of file +]