diff options
author | ZackaryWelch <welch.zackary@gmail.com> | 2017-06-16 09:54:54 -0400 |
---|---|---|
committer | ZackaryWelch <welch.zackary@gmail.com> | 2017-06-16 09:54:54 -0400 |
commit | 6f0560e29138b9b6b4444ec03614533200fff296 (patch) | |
tree | 6ba9a2e4b53f62c1c95ef696845fb0e7325cd94a | |
parent | HTML and Javascript syntax highlighting (diff) | |
download | lumina-6f0560e29138b9b6b4444ec03614533200fff296.tar.gz lumina-6f0560e29138b9b6b4444ec03614533200fff296.tar.bz2 lumina-6f0560e29138b9b6b4444ec03614533200fff296.zip |
Updated syntax files
4 files changed, 13 insertions, 4 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax index 9a235ae3..f504263e 100644 --- a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax +++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/cpp.syntax @@ -27,7 +27,7 @@ }, { "name": "keywords", - "words": ["char", "class", "const", "double", "enum", "explicit", "extern", "float", "friend", "inline", "int", "long", "namespace", "operator", "private", "protected", "public", "short", "signals", "signed", "slots", "static", "struct", "template", "typedef", "typename", "union", "unsigned", "virtual", "void", "volatile", "true", "false", "bool"], + "words": ["char", "class", "const", "double", "enum", "explicit", "extern", "float", "friend", "inline", "int", "long", "namespace", "operator", "private", "protected", "public", "short", "signals", "signed", "slots", "static", "struct", "template", "typedef", "typename", "union", "using","unsigned", "virtual", "void", "volatile", "true", "false", "bool"], "foreground": "colors/keyword", "font_weight": "bold" }, @@ -44,6 +44,11 @@ "font_weight": "bold" }, { + "name": "numbers", + "regex" : "\\b[0-9\\.]+\\b", + "foreground": "colors/text" + }, + { "name": "function names", "regex": "\\b[A-Za-z0-9_]+(?=\\()", "foreground": "colors/function" diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/javascript.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/javascript.syntax index a10045d7..d2ca28e9 100644 --- a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/javascript.syntax +++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/javascript.syntax @@ -31,7 +31,12 @@ }, { "name": "function names", - "regex": "\\b[A-Za-z0-9_]+(?=\\()|(?:\\.)[a-z]+", + "regex": "\\b[A-Za-z0-9_]+(?=\\()", + "foreground": "colors/function" + }, + { + "name": "attributes", + "regex": "(?<=\.)[A-Za-z_][A-Za-z0-9_]*", "foreground": "colors/function" }, { diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax index 678431b4..294c2c68 100644 --- a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax +++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/md.syntax @@ -70,7 +70,7 @@ }, { "name" : "horizontal rule", - "regex": "^((\\-\\-\\-)|(\\*\\*\\*))$", + "regex": "^((\\-[\\s]?\\-[\\s]?\\-[\\s]?)|(\\*\\*\\*))$", "foreground" : "colors/function" }, { diff --git a/src-qt5/desktop-utils/lumina-textedit/tests/test.js b/src-qt5/desktop-utils/lumina-textedit/tests/test.js index 81361577..696cd74d 100644 --- a/src-qt5/desktop-utils/lumina-textedit/tests/test.js +++ b/src-qt5/desktop-utils/lumina-textedit/tests/test.js @@ -42,4 +42,3 @@ function squaredDistance(p1, p2) { let d = distance(polygonCentroid(p1), polygonCentroid(p2)); return d * d; } -(?:[a-z]+[\.])([a-z])+ |