-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIndentation Rules - HTML.tmPreferences
55 lines (55 loc) · 1.67 KB
/
Indentation Rules - HTML.tmPreferences
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
<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<dict>
<key>scope</key>
<string>embedding.rml</string>
<key>settings</key>
<dict>
<key>decreaseIndentPattern</key>
<string><![CDATA[(?x)
# the beginning of the line followed by any amount of whitespace
# a valid HTML close tag except "html"
^[^<>]*+ </ (?!html[\t\n\f /<>])[^\t\n\f /<>]+ [^>]* >
| ^[\t\n\f ]*+
(
# closing comment punctuation, optionally preceded by an end "comment selector"
(<!\[ .*? \])?-->
# closing directive/section punctuation
| [?%]>
# closing curly brace
| \}
)
]]></string>
<key>increaseIndentPattern</key>
<string><![CDATA[(?x)
# the beginning of the line followed by any amount of whitespace
^.* (
# a valid non-self-closing HTML tag that doesn't close itself on the same line
<(?!
!-- # no comment
| [?%] # no preprocessor section like PHP/ASP
| (?i:!doctype) # no document type
| (?i:area|base|br|col|frame|hr|html|img|input|link|meta|param)[\t\n\f /<>]
)(?:
# tag name
(?<html_tag>[^\t\n\f /<>]+)
# not self closing
(?:(?!/>)[^>])* >
# not closing in the same line
(?! .* </\k<html_tag>)
)
# comments that don't close themselves on the same line
| <!--(?!.*?-->)
# directives that don't close themselves on the same line
| <\?(?!.*?\?>)
# sections that don't close themselves on the same line
| <\%(?!.*?\%>)
# open curly braces at the end of a line with comments allowed
| \{(?=\s*(?:<!--.*)?$)
)
]]></string>
<key>bracketIndentNextLinePattern</key>
<string><![CDATA[<(?i:!doctype)(?!.*>)]]></string>
</dict>
</dict>
</plist>