aboutsummaryrefslogtreecommitdiff
path: root/src-qt5/desktop-utils/lumina-textedit/syntax_rules/html.syntax
diff options
context:
space:
mode:
authorZackaryWelch <welch.zackary@gmail.com>2017-06-15 16:58:05 -0400
committerZackaryWelch <welch.zackary@gmail.com>2017-06-15 16:58:05 -0400
commit68c6331479f3c347fd6928071edbf11967947a95 (patch)
treeaa5ecf4c7e3bf5d933e4b156054956fec0a2cdc4 /src-qt5/desktop-utils/lumina-textedit/syntax_rules/html.syntax
parentMerge branch 'master' of github.com:trueos/lumina (diff)
downloadlumina-68c6331479f3c347fd6928071edbf11967947a95.tar.gz
lumina-68c6331479f3c347fd6928071edbf11967947a95.tar.bz2
lumina-68c6331479f3c347fd6928071edbf11967947a95.zip
HTML and Javascript syntax highlighting
Diffstat (limited to 'src-qt5/desktop-utils/lumina-textedit/syntax_rules/html.syntax')
-rw-r--r--src-qt5/desktop-utils/lumina-textedit/syntax_rules/html.syntax75
1 files changed, 75 insertions, 0 deletions
diff --git a/src-qt5/desktop-utils/lumina-textedit/syntax_rules/html.syntax b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/html.syntax
new file mode 100644
index 00000000..86909dcb
--- /dev/null
+++ b/src-qt5/desktop-utils/lumina-textedit/syntax_rules/html.syntax
@@ -0,0 +1,75 @@
+# Syntax support file for the Lumina Text Editor
+# ===================================
+# XML language support rules
+# Written by Ken Moore <ken@ixsystems.com>
+# Released under the 2-clause BSD license
+# ===================================
+
+{
+ "meta": {
+ "name": "HTML",
+ "file_suffix": ["html", "htm"]
+ },
+ "format": {
+ "line_wrap": false,
+ "highlight_whitespace_eol" : true,
+ "columns_per_line" : 70,
+ "font_type" : "monospace",
+ "tab_width": 8
+ },
+ "rules": [{
+ "name": "8 spaces rather than a tab",
+ "regex": "([ ]{8})+",
+ "background": "colors/bracket-missing"
+ },
+ {
+ "name": "tabs after spaces",
+ "regex": "( )+\\t",
+ "background": "colors/bracket-missing"
+ },
+ {
+ "name" : "odd number of spaces within indentation",
+ "regex": "(^|\\t)([ ]{2})*[ ](?=\\<)",
+ "background": "colors/bracket-missing"
+ },
+ {
+ "name" : "ID of a tag",
+ "regex": "<[^> ]+[>]?",
+ "font_weight" : "bold",
+ "foreground" : "colors/function"
+ },
+ {
+ "name" : "tag modifiers",
+ "regex" : "\\s[^\\= ]+(?=\\=)",
+ "foreground" : "colors/class"
+ },
+ {
+ "name" : "strings inside a tag",
+ "regex": "\\\"[^\\\"]*\\\"",
+ "foreground" : "colors/text"
+ },
+ {
+ "name" : "comment",
+ "regex_start" : "<!DOCTYPE",
+ "regex_end" : "[/]?>",
+ "foreground" : "colors/comment"
+ },
+ {
+ "name" : "comment",
+ "regex_start" : "<!--",
+ "regex_end" : "-->",
+ "foreground" : "colors/comment"
+ },
+ {
+ "name" : "escapes",
+ "regex" : "&[^;]*;",
+ "foreground" : "colors/preprocessor"
+ },
+ {
+ "name" : "HTML preprocessor",
+ "regex_start" : "\\<\\?html ",
+ "regex_end" : "\\?>",
+ "foreground" : "colors/preprocessor"
+ }
+ ]
+}
bgstack15