File tree Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Expand file tree Collapse file tree 2 files changed +37
-2
lines changed Original file line number Diff line number Diff line change 7
7
<key >hideFromUser </key >
8
8
<true />
9
9
<key >injectionSelector </key >
10
- <string >(L: text.html.markdown) </string >
10
+ <string >L:( text.html.markdown - (markup.italic.markdown | markup.bold.markdown | markup.raw) ) </string >
11
11
<key >name </key >
12
12
<string >Markdown (GitHub Italics) </string >
13
13
<key >patterns </key >
27
27
precedence and thus prevent the main Markdown grammar’s pattern for italic text from
28
28
matching these underscores.) </string >
29
29
<key >match </key >
30
- <string >(_)(? =\w)(? < =\w) </string >
30
+ <string >(? < =\w)(_)(? =\w) </string >
31
31
<key >name </key >
32
32
<string >markup.other </string >
33
33
</dict >
Original file line number Diff line number Diff line change
1
+ # Should Match
2
+
3
+ _ italic_
4
+
5
+ _ italic italic_
6
+
7
+ _ italic_regular
8
+
9
+
10
+ # Should Not Match
11
+
12
+ regular_regular_regular
13
+
14
+
15
+ # Should Not Match But Does
16
+
17
+ regular _ italic_regular
18
+
19
+
20
+ # Other Cases (Should not match)
21
+
22
+ __ double underscores__
23
+
24
+ _raw_
25
+
26
+ raw_raw_raw
27
+
28
+ Lorem ` ipsum_dolor_sit ` amet
29
+
30
+
31
+ # Exceptional Cases
32
+
33
+ $$ y_i = \alpha_{j[i]} + \beta x_i + \epsilon_i $$
34
+
35
+ This is MathJax code which should be parsed separately, but shows just how loose the main spec is about what can be in italic.
You can’t perform that action at this time.
0 commit comments