-
Notifications
You must be signed in to change notification settings - Fork 17
/
md.jsf
153 lines (118 loc) · 2.17 KB
/
md.jsf
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# JOE syntax highlight file for Markdown
# by Christian Nicolai (http://mycrobase.de)
# And yes, this *is* a joke :p
# bold parsing is not that perfect since this works: **bold__
=Idle
=Tag green
=Escape bold
=Bad bold red
=Bold bold
=Headline bold yellow
=Quote green
=Code green
=List yellow
=LinkDesc green
=Link blue
=Rule inverse
:line_start Idle
* idle noeat
"#" headline_prefix recolor=-1
">" quote recolor=-1
" " maybe_code1
"\t" code
"-*" maybe_list
:idle Idle
* idle
"\n" line_start
"<" tag recolor=-1
"\\" escape recolor=-1
"*_" maybe_bold1
"[" maybe_link_desc1
"`" backtick buffer noeat
:headline_prefix Idle
* headline
"#" headline_prefix
:headline Headline
* headline
"\n" line_start
:quote Quote
* quote
"\n" line_start
:maybe_code1 Idle
* idle
" " maybe_code2
:maybe_code2 Idle
* idle
" " maybe_code3
:maybe_code3 Idle
* idle
" " code recolor=-4
:code Code
* code
"\n" line_start
:maybe_list Idle
* idle
" " list
"-*" maybe_rule1
:list List
* list
"\n" line_start
:maybe_rule1 Idle
* idle
"-*" rule recolor=-3
:rule Rule
* rule
"\n" line_start
:tag Tag
* idle
"a-z0-9 /" tag
">" idle
# do escaping of *_ and so on
:escape Escape
* idle
:maybe_bold1 Idle
* idle noeat
"*_" bold recolor=-2
:bold Bold
* bold
"\n" line_start # end if we reach newline during bold
"*_" maybe_end_bold
:maybe_end_bold Bold
* bold
"*_" end_bold
:end_bold Bold
* idle noeat
:maybe_link_desc1 Idle
* maybe_link_desc mark
:maybe_link_desc Idle
* maybe_link_desc
"]" maybe_end_link_desc markend
:maybe_end_link_desc Idle
* idle
"(" link_inline1 recolormark
"[" link_ref1 recolormark
:link_inline1 LinkDesc
* link_inline noeat
:link_inline Link
* link_inline
")" link_end noeat
:link_ref1 LinkDesc
* link_ref noeat
:link_ref Link
* link_ref
"]" link_end noeat
:link_end Idle
* idle
:backtick Quote
* backtick_body save_s noeat
"`" backtick
:backtick_body Code
* backtick_body
"`" backtick_end_maybe buffer
:backtick_end_maybe Code
* backtick_body strings
"&" backtick_end
done
"`" backtick_end_maybe
:backtick_end Quote
* idle noeat