forked from facelessuser/BracketHighlighter
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bh_tag.sublime-settings
127 lines (117 loc) · 4.26 KB
/
bh_tag.sublime-settings
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
{
/* If you add a new key to one of these settings, you must add one to all! */
// This is where you initially define a new tag mode.
// This new tag_mode key must be used in all other settings in this file
// to set up its specific settings.
// Determine which style of tag-matching to use in which syntax.
"tag_mode": [
{"mode": "xml", "syntax": ["XML"]},
{
"mode": "xhtml",
"syntax": [
"HTML",
"HTML 5",
"PHP",
"HTML (Jinja Templates)",
"HTML (Jinja2)",
"HTML (Rails)",
"HTML (Twig)",
"HTML (Django)",
"laravel-blade",
"blade",
"Handlebars",
"AngularJS",
"Java Server Pages (JSP)"
],
"first_line": "^[ \\t]*<\\?xml"
},
{
"mode": "html",
"syntax": [
"HTML",
"HTML 5",
"PHP",
"HTML (Jinja Templates)",
"HTML (Jinja2)",
"HTML (Rails)",
"HTML (Twig)",
"HTML (Django)",
"laravel-blade",
"blade",
"Handlebars",
"AngularJS",
"Java Server Pages (JSP)"
]
},
{
"mode": "cfml",
"syntax": ["HTML+CFML", "ColdFusion", "ColdFusionCFC"]
}
],
// Style to use for matched tags
"tag_style": {
"xml": "tag",
"xhtml": "tag",
"html": "tag",
"cfml": "tag"
},
// Scopes to exclude from tag searches.
"tag_scope_exclude": {
"xhtml": ["string", "comment"],
"html": ["string", "comment"],
"cfml": ["string", "comment"]
},
// Optional closing HTML tags. You can use 'null' if it does not require a pattern.
"optional_tag_patterns": {
"xml": null,
"xhtml": null,
"html": "colgroup|dd|dt|li|options|p|td|tfoot|th|thead|tr",
"cfml": "cf.+|colgroup|dd|dt|li|options|p|td|tfoot|th|thead|tr"
},
// Tags that never have a closing. You can use 'null' if it does not require a pattern.
"void_tag_patterns": {
"xml": null,
"xhtml": null,
"html": "area|base|basefont|br|col|embed|frame|hr|img|input|isindex|keygen|link|meta|param|source|track|wbr",
"cfml": "area|base|basefont|br|col|embed|frame|hr|img|input|isindex|keygen|link|meta|param|source|track|wbr"
},
// Self closing tags. Single tags that are closed like this <tag />
"self_closing_tag_patterns": {
"xml": "[\\w:\\.\\-]+",
"xhtml": "[\\w:\\.\\-]+",
"html": "circle|ellipse|line|path|polygon|polyline|rect|stop|use",
"cfml": "cf.+"
},
// Regex for tag name. Do not use capturing groups.
"tag_name":
{
"xml": "[\\w:\\.\\-]+",
"xhtml": "[\\w:\\.\\-]+",
"html": "[\\w:\\.\\-]+",
"cfml": "[\\w:\\.\\-]+"
},
// HTML attributes. Do not use capturing groups.
"attributes":
{
"xml": "[\\w:][-\\w\\d:.]*(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'))?",
"xhtml": "[\\w:][-\\w\\d:.]*(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'))?",
"html": "[\\w:][-\\w\\d:.]*(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s\"'`=<>]+))?",
"cfml": "[\\w:][-\\w\\d:.]*(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s\"'`=<>]+))?"
},
// Regex for start/opening tag. Use a capturing group for tag name and self closing indicator '/' only.
// Attributes and tag names are inserted using python string formatting:
// the keyword 'attributes' and `tag_name` are used.
"start_tag": {
"xml": "<(%(tag_name)s)(?:\\s+%(attributes)s)*\\s*(/?)>",
"xhtml": "<(%(tag_name)s)(?:\\s+%(attributes)s)*\\s*(/?)>",
"html": "<(%(tag_name)s)(?:\\s+%(attributes)s)*\\s*(/?)>",
"cfml": "<(%(tag_name)s)(?:(?:\\s+%(attributes)s)*|(?:(?<=cfif)|(?<=cfelseif))[^>]+)\\s*(/?)>"
},
// Regex for end/closing tag. Only use a capturing group for name.
"end_tag": {
"xml": "</([\\w\\:\\.\\-]+)[^>]*>",
"xhtml": "</([\\w\\:\\.\\-]+)[^>]*>",
"html": "</([\\w\\:\\.\\-]+)[^>]*>",
"cfml": "</([\\w\\:\\.\\-]+)[^>]*>"
}
}