forked from facelessuser/BracketHighlighter
-
Notifications
You must be signed in to change notification settings - Fork 0
/
bh_tag.sublime-settings
86 lines (77 loc) · 2.97 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
{
/* If you add a new key to one of these settings, you must add one to all! */
// This is where you intially 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": {
"xhtml": ["XML"],
"html": [
"HTML",
"HTML 5",
"PHP",
"HTML (Jinja Templates)",
"HTML (Rails)",
"HTML (Twig)",
"HTML (Django)",
"laravel-blade",
"blade",
"Handlebars",
"AngularJS",
"Java Server Pages (JSP)"
],
"cfml": ["HTML+CFML", "ColdFusion", "ColdFusionCFC"]
},
// Style to use for matched tags
"tag_style": {
"xhtml": "tag",
"html": "tag",
"cfml": "tag"
},
// Scopes to exclude from tag searches.
"tag_scope_exclude": {
"xhtml": ["string", "comment"],
"html": ["string", "comment"],
"cfml": ["string", "comment"]
},
// Self closing HTML tags. You can use 'null' if it does not require a pattern.
"self_closing_patterns": {
"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.
"single_tag_patterns": {
"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"
},
// Regex for tag name. Do not use capturing groups.
"tag_name":
{
"xhtml": "[\\w:\\.\\-]+",
"html": "[\\w:\\.\\-]+",
"cfml": "[\\w:\\.\\-]+"
},
// HTML attributes. Do not use capturing groups.
"attributes":
{
"xhtml": "[\\w\\-:]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'))?",
"html": "[\\w\\-:]+(?:\\s*=\\s*(?:\"[^\"]*\"|'[^']*'|[^\\s\"'`=<>]+))?",
"cfml": "[\\w\\-\\.:]+(?:\\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": {
"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": {
"xhtml": "</([\\w\\:\\.\\-]+)[^>]*>",
"html": "</([\\w\\:\\.\\-]+)[^>]*>",
"cfml": "</([\\w\\:\\.\\-]+)[^>]*>"
}
}