Skip to content

Commit 92c7331

Browse files
committed
BUG: two header after one another is incorrect in symbol list
1 parent fffcf5e commit 92c7331

7 files changed

+148
-15
lines changed

Note.tmLanguage

+7-7
Original file line numberDiff line numberDiff line change
@@ -1427,9 +1427,9 @@
14271427
<key>heading1</key>
14281428
<dict>
14291429
<key>begin</key>
1430-
<string>\G(#{1})(?!#)\s*(?=\S)</string>
1430+
<string>\G(#{1})(?!#)[ \t]*(?=\S)</string>
14311431
<key>end</key>
1432-
<string>\s*(#*)$\n?</string>
1432+
<string>[ \t]*(#*)\n?$</string>
14331433
<key>captures</key>
14341434
<dict>
14351435
<key>1</key>
@@ -1455,7 +1455,7 @@
14551455
<key>begin</key>
14561456
<string>\G(#{2})(?!#)\s*(?=\S)</string>
14571457
<key>end</key>
1458-
<string>\s*(#*)$\n?</string>
1458+
<string>[ \t]*(#*)$\n?</string>
14591459
<key>captures</key>
14601460
<dict>
14611461
<key>1</key>
@@ -1481,7 +1481,7 @@
14811481
<key>begin</key>
14821482
<string>\G(#{3})(?!#)\s*(?=\S)</string>
14831483
<key>end</key>
1484-
<string>\s*(#*)$\n?</string>
1484+
<string>[ \t]*(#*)$\n?</string>
14851485
<key>captures</key>
14861486
<dict>
14871487
<key>1</key>
@@ -1507,7 +1507,7 @@
15071507
<key>begin</key>
15081508
<string>\G(#{4})(?!#)\s*(?=\S)</string>
15091509
<key>end</key>
1510-
<string>\s*(#*)$\n?</string>
1510+
<string>[ \t]*(#*)$\n?</string>
15111511
<key>captures</key>
15121512
<dict>
15131513
<key>1</key>
@@ -1533,7 +1533,7 @@
15331533
<key>begin</key>
15341534
<string>\G(#{5})(?!#)\s*(?=\S)</string>
15351535
<key>end</key>
1536-
<string>\s*(#*)$\n?</string>
1536+
<string>[ \t]*(#*)$\n?</string>
15371537
<key>captures</key>
15381538
<dict>
15391539
<key>1</key>
@@ -1559,7 +1559,7 @@
15591559
<key>begin</key>
15601560
<string>\G(#{6})(?!#)\s*(?=\S)</string>
15611561
<key>end</key>
1562-
<string>\s*(#*)$\n?</string>
1562+
<string>[ \t]*(#*)$\n?</string>
15631563
<key>captures</key>
15641564
<dict>
15651565
<key>1</key>

Symbol List - Heading.tmPreferences renamed to Symbol List - Heading1.tmPreferences

+1-8
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<key>name</key>
66
<string>Symbol List</string>
77
<key>scope</key>
8-
<string>text.html.markdown.note markup.heading</string>
8+
<string>text.html.markdown.note markup.heading.1 entity.name</string>
99
<key>settings</key>
1010
<dict>
1111
<key>showInSymbolList</key>
@@ -17,19 +17,12 @@
1717
s/:[^ ]+://g; # remove tags
1818
s/\s*#+\s*$//g;
1919
s/^\s*#(#*)\s*/$1/g;
20-
s/^#{5}/ /g;
21-
s/^#{4}/ /g;
22-
s/^#{3}/ /g;
23-
s/^#{2}/ /g;
24-
s/^#{1}/ /g;
2520
s/^(-+)\s*$/ $1/
2621
</string>
2722
<key>symbolIndexTransformation</key>
2823
<string>
2924
s/\s*#+\s*$//g;
3025
</string>
3126
</dict>
32-
<key>uuid</key>
33-
<string>0957d739-b2ba-43fe-85d5-fee7e35ff136</string>
3427
</dict>
3528
</plist>

Symbol List - Heading2.tmPreferences

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>name</key>
6+
<string>Symbol List</string>
7+
<key>scope</key>
8+
<string>text.html.markdown.note markup.heading.2 entity.name</string>
9+
<key>settings</key>
10+
<dict>
11+
<key>showInSymbolList</key>
12+
<integer>1</integer>
13+
<key>showInIndexedSymbolList</key>
14+
<integer>1</integer>
15+
<key>symbolTransformation</key>
16+
<string>
17+
s/:[^ ]+://g; # remove tags
18+
s/\s*#+\s*$//g;
19+
s/^\s*#(#*)\s*/$1/g;
20+
s/^/ /g;
21+
</string>
22+
<key>symbolIndexTransformation</key>
23+
<string>
24+
s/\s*#+\s*$//g;
25+
</string>
26+
</dict>
27+
</dict>
28+
</plist>

Symbol List - Heading3.tmPreferences

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>name</key>
6+
<string>Symbol List</string>
7+
<key>scope</key>
8+
<string>text.html.markdown.note markup.heading.3 entity.name</string>
9+
<key>settings</key>
10+
<dict>
11+
<key>showInSymbolList</key>
12+
<integer>1</integer>
13+
<key>showInIndexedSymbolList</key>
14+
<integer>1</integer>
15+
<key>symbolTransformation</key>
16+
<string>
17+
s/:[^ ]+://g; # remove tags
18+
s/\s*#+\s*$//g;
19+
s/^\s*#(#*)\s*/$1/g;
20+
s/^/ /g;
21+
</string>
22+
<key>symbolIndexTransformation</key>
23+
<string>
24+
s/\s*#+\s*$//g;
25+
</string>
26+
</dict>
27+
</dict>
28+
</plist>

Symbol List - Heading4.tmPreferences

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>name</key>
6+
<string>Symbol List</string>
7+
<key>scope</key>
8+
<string>text.html.markdown.note markup.heading.4 entity.name</string>
9+
<key>settings</key>
10+
<dict>
11+
<key>showInSymbolList</key>
12+
<integer>1</integer>
13+
<key>showInIndexedSymbolList</key>
14+
<integer>1</integer>
15+
<key>symbolTransformation</key>
16+
<string>
17+
s/:[^ ]+://g; # remove tags
18+
s/\s*#+\s*$//g;
19+
s/^\s*#(#*)\s*/$1/g;
20+
s/^/ /g;
21+
</string>
22+
<key>symbolIndexTransformation</key>
23+
<string>
24+
s/\s*#+\s*$//g;
25+
</string>
26+
</dict>
27+
</dict>
28+
</plist>

Symbol List - Heading5.tmPreferences

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>name</key>
6+
<string>Symbol List</string>
7+
<key>scope</key>
8+
<string>text.html.markdown.note markup.heading.5 entity.name</string>
9+
<key>settings</key>
10+
<dict>
11+
<key>showInSymbolList</key>
12+
<integer>1</integer>
13+
<key>showInIndexedSymbolList</key>
14+
<integer>1</integer>
15+
<key>symbolTransformation</key>
16+
<string>
17+
s/:[^ ]+://g; # remove tags
18+
s/\s*#+\s*$//g;
19+
s/^\s*#(#*)\s*/$1/g;
20+
s/^/ /g;
21+
</string>
22+
<key>symbolIndexTransformation</key>
23+
<string>
24+
s/\s*#+\s*$//g;
25+
</string>
26+
</dict>
27+
</dict>
28+
</plist>

Symbol List - Heading6.tmPreferences

+28
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<key>name</key>
6+
<string>Symbol List</string>
7+
<key>scope</key>
8+
<string>text.html.markdown.note markup.heading.6 entity.name</string>
9+
<key>settings</key>
10+
<dict>
11+
<key>showInSymbolList</key>
12+
<integer>1</integer>
13+
<key>showInIndexedSymbolList</key>
14+
<integer>1</integer>
15+
<key>symbolTransformation</key>
16+
<string>
17+
s/:[^ ]+://g; # remove tags
18+
s/\s*#+\s*$//g;
19+
s/^\s*#(#*)\s*/$1/g;
20+
s/^/ /g;
21+
</string>
22+
<key>symbolIndexTransformation</key>
23+
<string>
24+
s/\s*#+\s*$//g;
25+
</string>
26+
</dict>
27+
</dict>
28+
</plist>

0 commit comments

Comments
 (0)