YSRedCloth 4.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gemtest +0 -0
- data/.rspec +1 -0
- data/CHANGELOG +261 -0
- data/COPYING +18 -0
- data/Gemfile +7 -0
- data/README.rdoc +198 -0
- data/Rakefile +18 -0
- data/bin/redcloth +28 -0
- data/doc/textile_reference.html +631 -0
- data/ext/redcloth_scan/extconf.rb +6 -0
- data/ext/redcloth_scan/redcloth.h +220 -0
- data/ext/redcloth_scan/redcloth_attributes.c +738 -0
- data/ext/redcloth_scan/redcloth_inline.c +8741 -0
- data/ext/redcloth_scan/redcloth_scan.c +26229 -0
- data/lib/case_sensitive_require/RedCloth.rb +6 -0
- data/lib/redcloth/erb_extension.rb +27 -0
- data/lib/redcloth/formatters/base.rb +63 -0
- data/lib/redcloth/formatters/html.rb +345 -0
- data/lib/redcloth/formatters/latex.rb +322 -0
- data/lib/redcloth/formatters/latex_entities.yml +2414 -0
- data/lib/redcloth/textile_doc.rb +103 -0
- data/lib/redcloth/version.rb +34 -0
- data/lib/redcloth.rb +45 -0
- data/lib/tasks/pureruby.rake +17 -0
- data/redcloth.gemspec +52 -0
- data/spec/benchmark_spec.rb +15 -0
- data/spec/custom_tags_spec.rb +50 -0
- data/spec/erb_spec.rb +10 -0
- data/spec/extension_spec.rb +26 -0
- data/spec/fixtures/basic.yml +1028 -0
- data/spec/fixtures/code.yml +257 -0
- data/spec/fixtures/definitions.yml +82 -0
- data/spec/fixtures/extra_whitespace.yml +64 -0
- data/spec/fixtures/filter_html.yml +177 -0
- data/spec/fixtures/filter_pba.yml +20 -0
- data/spec/fixtures/html.yml +348 -0
- data/spec/fixtures/images.yml +279 -0
- data/spec/fixtures/instiki.yml +38 -0
- data/spec/fixtures/links.yml +291 -0
- data/spec/fixtures/lists.yml +462 -0
- data/spec/fixtures/poignant.yml +89 -0
- data/spec/fixtures/sanitize_html.yml +42 -0
- data/spec/fixtures/table.yml +434 -0
- data/spec/fixtures/textism.yml +509 -0
- data/spec/fixtures/threshold.yml +762 -0
- data/spec/formatters/class_filtered_html_spec.rb +7 -0
- data/spec/formatters/filtered_html_spec.rb +7 -0
- data/spec/formatters/html_no_breaks_spec.rb +9 -0
- data/spec/formatters/html_spec.rb +13 -0
- data/spec/formatters/id_filtered_html_spec.rb +7 -0
- data/spec/formatters/latex_spec.rb +13 -0
- data/spec/formatters/lite_mode_html_spec.rb +7 -0
- data/spec/formatters/no_span_caps_html_spec.rb +7 -0
- data/spec/formatters/sanitized_html_spec.rb +7 -0
- data/spec/formatters/style_filtered_html_spec.rb +7 -0
- data/spec/parser_spec.rb +102 -0
- data/spec/spec_helper.rb +36 -0
- data/tasks/compile.rake +47 -0
- data/tasks/gems.rake +37 -0
- data/tasks/ragel_extension_task.rb +127 -0
- data/tasks/release.rake +15 -0
- data/tasks/rspec.rake +13 -0
- data/tasks/rvm.rake +79 -0
- metadata +264 -0
|
@@ -0,0 +1,738 @@
|
|
|
1
|
+
|
|
2
|
+
#line 1 "ragel/redcloth_attributes.c.rl"
|
|
3
|
+
/*
|
|
4
|
+
* redcloth_attributes.c.rl
|
|
5
|
+
*
|
|
6
|
+
* Copyright (C) 2009 Jason Garber
|
|
7
|
+
*/
|
|
8
|
+
#define RSTRING_NOT_MODIFIED
|
|
9
|
+
#include <ruby.h>
|
|
10
|
+
#include "redcloth.h"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
#line 16 "ragel/redcloth_attributes.c.rl"
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
#line 18 "ext/redcloth_scan/redcloth_attributes.c"
|
|
18
|
+
static const char _redcloth_attributes_actions[] = {
|
|
19
|
+
0, 1, 2, 1, 4, 1, 5, 1,
|
|
20
|
+
6, 1, 7, 1, 8, 1, 11, 1,
|
|
21
|
+
12, 1, 13, 1, 15, 1, 18, 1,
|
|
22
|
+
19, 2, 3, 14, 2, 10, 17, 2,
|
|
23
|
+
13, 0, 2, 13, 1, 2, 13, 2,
|
|
24
|
+
2, 13, 5, 2, 13, 6, 2, 13,
|
|
25
|
+
7, 2, 13, 8, 3, 9, 10, 16
|
|
26
|
+
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
static const short _redcloth_attributes_key_offsets[] = {
|
|
30
|
+
0, 0, 6, 11, 27, 33, 38, 44,
|
|
31
|
+
60, 66, 84, 102, 112, 123, 131, 140,
|
|
32
|
+
147, 153, 158, 174, 192, 196, 201, 212,
|
|
33
|
+
225, 239, 253, 267, 290, 304, 328, 352,
|
|
34
|
+
377, 384, 390, 405, 419, 434, 444, 450,
|
|
35
|
+
465, 479, 494, 504, 511, 521, 532, 548,
|
|
36
|
+
566, 585, 604, 623, 651, 671, 700, 729,
|
|
37
|
+
759, 775, 791, 801, 812, 828, 846, 865,
|
|
38
|
+
884, 903, 931, 951, 980, 1009, 1039, 1042,
|
|
39
|
+
1048, 1063, 1077, 1092, 1101, 1111, 1122, 1138,
|
|
40
|
+
1156, 1175, 1194, 1213, 1241, 1261, 1290, 1319,
|
|
41
|
+
1349
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
static const char _redcloth_attributes_trans_keys[] = {
|
|
45
|
+
0, 9, 10, 32, 11, 13, 0, 9,
|
|
46
|
+
32, 10, 13, 0, 9, 10, 32, 35,
|
|
47
|
+
41, 45, 95, 11, 13, 48, 57, 65,
|
|
48
|
+
90, 97, 122, 0, 9, 10, 32, 11,
|
|
49
|
+
13, 0, 9, 32, 10, 13, 0, 9,
|
|
50
|
+
10, 32, 11, 13, 0, 9, 10, 32,
|
|
51
|
+
35, 41, 45, 95, 11, 13, 48, 57,
|
|
52
|
+
65, 90, 97, 122, 0, 9, 10, 32,
|
|
53
|
+
11, 13, 0, 9, 10, 32, 61, 95,
|
|
54
|
+
117, 125, 11, 13, 34, 41, 44, 59,
|
|
55
|
+
64, 90, 97, 122, 0, 9, 10, 32,
|
|
56
|
+
61, 95, 117, 125, 11, 13, 34, 41,
|
|
57
|
+
44, 59, 64, 90, 97, 122, 32, 35,
|
|
58
|
+
45, 95, 48, 57, 65, 90, 97, 122,
|
|
59
|
+
32, 35, 41, 45, 95, 48, 57, 65,
|
|
60
|
+
90, 97, 122, 45, 95, 48, 57, 65,
|
|
61
|
+
90, 97, 122, 41, 45, 95, 48, 57,
|
|
62
|
+
65, 90, 97, 122, 0, 32, 40, 91,
|
|
63
|
+
123, 9, 13, 0, 9, 10, 32, 11,
|
|
64
|
+
13, 0, 9, 32, 10, 13, 0, 9,
|
|
65
|
+
10, 32, 35, 41, 45, 95, 11, 13,
|
|
66
|
+
48, 57, 65, 90, 97, 122, 0, 9,
|
|
67
|
+
10, 32, 61, 95, 117, 125, 11, 13,
|
|
68
|
+
34, 41, 44, 59, 64, 90, 97, 122,
|
|
69
|
+
45, 95, 97, 122, 45, 93, 95, 97,
|
|
70
|
+
122, 32, 61, 95, 34, 41, 44, 59,
|
|
71
|
+
64, 90, 97, 122, 32, 61, 95, 117,
|
|
72
|
+
125, 34, 41, 44, 59, 64, 90, 97,
|
|
73
|
+
122, 32, 61, 95, 114, 117, 125, 34,
|
|
74
|
+
41, 44, 59, 64, 90, 97, 122, 32,
|
|
75
|
+
61, 95, 108, 117, 125, 34, 41, 44,
|
|
76
|
+
59, 64, 90, 97, 122, 32, 40, 61,
|
|
77
|
+
95, 117, 125, 34, 41, 44, 59, 64,
|
|
78
|
+
90, 97, 122, 32, 39, 43, 44, 61,
|
|
79
|
+
63, 64, 92, 95, 117, 125, 34, 35,
|
|
80
|
+
36, 41, 45, 57, 58, 59, 65, 90,
|
|
81
|
+
97, 122, 39, 41, 43, 61, 92, 95,
|
|
82
|
+
34, 35, 45, 57, 63, 64, 97, 122,
|
|
83
|
+
32, 39, 43, 44, 61, 63, 64, 92,
|
|
84
|
+
95, 114, 117, 125, 34, 35, 36, 41,
|
|
85
|
+
45, 57, 58, 59, 65, 90, 97, 122,
|
|
86
|
+
32, 39, 43, 44, 61, 63, 64, 92,
|
|
87
|
+
95, 108, 117, 125, 34, 35, 36, 41,
|
|
88
|
+
45, 57, 58, 59, 65, 90, 97, 122,
|
|
89
|
+
32, 41, 43, 44, 61, 63, 64, 92,
|
|
90
|
+
95, 117, 125, 34, 35, 36, 38, 39,
|
|
91
|
+
40, 45, 57, 58, 59, 65, 90, 97,
|
|
92
|
+
122, 0, 32, 40, 91, 123, 9, 13,
|
|
93
|
+
0, 9, 10, 32, 11, 13, 0, 9,
|
|
94
|
+
10, 32, 35, 45, 95, 11, 13, 48,
|
|
95
|
+
57, 65, 90, 97, 122, 0, 9, 10,
|
|
96
|
+
32, 45, 95, 11, 13, 48, 57, 65,
|
|
97
|
+
90, 97, 122, 0, 9, 10, 32, 41,
|
|
98
|
+
45, 95, 11, 13, 48, 57, 65, 90,
|
|
99
|
+
97, 122, 0, 9, 10, 32, 40, 46,
|
|
100
|
+
91, 123, 11, 13, 0, 9, 10, 32,
|
|
101
|
+
11, 13, 0, 9, 10, 32, 35, 45,
|
|
102
|
+
95, 11, 13, 48, 57, 65, 90, 97,
|
|
103
|
+
122, 0, 9, 10, 32, 45, 95, 11,
|
|
104
|
+
13, 48, 57, 65, 90, 97, 122, 0,
|
|
105
|
+
9, 10, 32, 41, 45, 95, 11, 13,
|
|
106
|
+
48, 57, 65, 90, 97, 122, 0, 9,
|
|
107
|
+
10, 32, 40, 46, 91, 123, 11, 13,
|
|
108
|
+
0, 9, 10, 32, 46, 11, 13, 0,
|
|
109
|
+
9, 10, 32, 45, 95, 11, 13, 97,
|
|
110
|
+
122, 0, 9, 10, 32, 45, 93, 95,
|
|
111
|
+
11, 13, 97, 122, 0, 9, 10, 32,
|
|
112
|
+
61, 95, 11, 13, 34, 41, 44, 59,
|
|
113
|
+
64, 90, 97, 122, 0, 9, 10, 32,
|
|
114
|
+
61, 95, 117, 125, 11, 13, 34, 41,
|
|
115
|
+
44, 59, 64, 90, 97, 122, 0, 9,
|
|
116
|
+
10, 32, 61, 95, 114, 117, 125, 11,
|
|
117
|
+
13, 34, 41, 44, 59, 64, 90, 97,
|
|
118
|
+
122, 0, 9, 10, 32, 61, 95, 108,
|
|
119
|
+
117, 125, 11, 13, 34, 41, 44, 59,
|
|
120
|
+
64, 90, 97, 122, 0, 9, 10, 32,
|
|
121
|
+
40, 61, 95, 117, 125, 11, 13, 34,
|
|
122
|
+
41, 44, 59, 64, 90, 97, 122, 0,
|
|
123
|
+
9, 10, 32, 39, 43, 44, 61, 63,
|
|
124
|
+
64, 92, 95, 117, 125, 11, 13, 34,
|
|
125
|
+
35, 36, 41, 45, 57, 58, 59, 65,
|
|
126
|
+
90, 97, 122, 0, 9, 10, 32, 39,
|
|
127
|
+
41, 43, 61, 92, 95, 11, 13, 34,
|
|
128
|
+
35, 45, 57, 63, 64, 97, 122, 0,
|
|
129
|
+
9, 10, 32, 39, 43, 44, 61, 63,
|
|
130
|
+
64, 92, 95, 114, 117, 125, 11, 13,
|
|
131
|
+
34, 35, 36, 41, 45, 57, 58, 59,
|
|
132
|
+
65, 90, 97, 122, 0, 9, 10, 32,
|
|
133
|
+
39, 43, 44, 61, 63, 64, 92, 95,
|
|
134
|
+
108, 117, 125, 11, 13, 34, 35, 36,
|
|
135
|
+
41, 45, 57, 58, 59, 65, 90, 97,
|
|
136
|
+
122, 0, 9, 10, 32, 41, 43, 44,
|
|
137
|
+
61, 63, 64, 92, 95, 117, 125, 11,
|
|
138
|
+
13, 34, 35, 36, 38, 39, 40, 45,
|
|
139
|
+
57, 58, 59, 65, 90, 97, 122, 0,
|
|
140
|
+
9, 10, 32, 35, 41, 45, 95, 11,
|
|
141
|
+
13, 48, 57, 65, 90, 97, 122, 0,
|
|
142
|
+
9, 10, 32, 35, 41, 45, 95, 11,
|
|
143
|
+
13, 48, 57, 65, 90, 97, 122, 0,
|
|
144
|
+
9, 10, 32, 45, 95, 11, 13, 97,
|
|
145
|
+
122, 0, 9, 10, 32, 45, 93, 95,
|
|
146
|
+
11, 13, 97, 122, 0, 9, 10, 32,
|
|
147
|
+
61, 95, 11, 13, 34, 41, 44, 59,
|
|
148
|
+
64, 90, 97, 122, 0, 9, 10, 32,
|
|
149
|
+
61, 95, 117, 125, 11, 13, 34, 41,
|
|
150
|
+
44, 59, 64, 90, 97, 122, 0, 9,
|
|
151
|
+
10, 32, 61, 95, 114, 117, 125, 11,
|
|
152
|
+
13, 34, 41, 44, 59, 64, 90, 97,
|
|
153
|
+
122, 0, 9, 10, 32, 61, 95, 108,
|
|
154
|
+
117, 125, 11, 13, 34, 41, 44, 59,
|
|
155
|
+
64, 90, 97, 122, 0, 9, 10, 32,
|
|
156
|
+
40, 61, 95, 117, 125, 11, 13, 34,
|
|
157
|
+
41, 44, 59, 64, 90, 97, 122, 0,
|
|
158
|
+
9, 10, 32, 39, 43, 44, 61, 63,
|
|
159
|
+
64, 92, 95, 117, 125, 11, 13, 34,
|
|
160
|
+
35, 36, 41, 45, 57, 58, 59, 65,
|
|
161
|
+
90, 97, 122, 0, 9, 10, 32, 39,
|
|
162
|
+
41, 43, 61, 92, 95, 11, 13, 34,
|
|
163
|
+
35, 45, 57, 63, 64, 97, 122, 0,
|
|
164
|
+
9, 10, 32, 39, 43, 44, 61, 63,
|
|
165
|
+
64, 92, 95, 114, 117, 125, 11, 13,
|
|
166
|
+
34, 35, 36, 41, 45, 57, 58, 59,
|
|
167
|
+
65, 90, 97, 122, 0, 9, 10, 32,
|
|
168
|
+
39, 43, 44, 61, 63, 64, 92, 95,
|
|
169
|
+
108, 117, 125, 11, 13, 34, 35, 36,
|
|
170
|
+
41, 45, 57, 58, 59, 65, 90, 97,
|
|
171
|
+
122, 0, 9, 10, 32, 41, 43, 44,
|
|
172
|
+
61, 63, 64, 92, 95, 117, 125, 11,
|
|
173
|
+
13, 34, 35, 36, 38, 39, 40, 45,
|
|
174
|
+
57, 58, 59, 65, 90, 97, 122, 40,
|
|
175
|
+
91, 123, 0, 9, 10, 32, 11, 13,
|
|
176
|
+
0, 9, 10, 32, 35, 45, 95, 11,
|
|
177
|
+
13, 48, 57, 65, 90, 97, 122, 0,
|
|
178
|
+
9, 10, 32, 45, 95, 11, 13, 48,
|
|
179
|
+
57, 65, 90, 97, 122, 0, 9, 10,
|
|
180
|
+
32, 41, 45, 95, 11, 13, 48, 57,
|
|
181
|
+
65, 90, 97, 122, 0, 9, 10, 32,
|
|
182
|
+
40, 91, 123, 11, 13, 0, 9, 10,
|
|
183
|
+
32, 45, 95, 11, 13, 97, 122, 0,
|
|
184
|
+
9, 10, 32, 45, 93, 95, 11, 13,
|
|
185
|
+
97, 122, 0, 9, 10, 32, 61, 95,
|
|
186
|
+
11, 13, 34, 41, 44, 59, 64, 90,
|
|
187
|
+
97, 122, 0, 9, 10, 32, 61, 95,
|
|
188
|
+
117, 125, 11, 13, 34, 41, 44, 59,
|
|
189
|
+
64, 90, 97, 122, 0, 9, 10, 32,
|
|
190
|
+
61, 95, 114, 117, 125, 11, 13, 34,
|
|
191
|
+
41, 44, 59, 64, 90, 97, 122, 0,
|
|
192
|
+
9, 10, 32, 61, 95, 108, 117, 125,
|
|
193
|
+
11, 13, 34, 41, 44, 59, 64, 90,
|
|
194
|
+
97, 122, 0, 9, 10, 32, 40, 61,
|
|
195
|
+
95, 117, 125, 11, 13, 34, 41, 44,
|
|
196
|
+
59, 64, 90, 97, 122, 0, 9, 10,
|
|
197
|
+
32, 39, 43, 44, 61, 63, 64, 92,
|
|
198
|
+
95, 117, 125, 11, 13, 34, 35, 36,
|
|
199
|
+
41, 45, 57, 58, 59, 65, 90, 97,
|
|
200
|
+
122, 0, 9, 10, 32, 39, 41, 43,
|
|
201
|
+
61, 92, 95, 11, 13, 34, 35, 45,
|
|
202
|
+
57, 63, 64, 97, 122, 0, 9, 10,
|
|
203
|
+
32, 39, 43, 44, 61, 63, 64, 92,
|
|
204
|
+
95, 114, 117, 125, 11, 13, 34, 35,
|
|
205
|
+
36, 41, 45, 57, 58, 59, 65, 90,
|
|
206
|
+
97, 122, 0, 9, 10, 32, 39, 43,
|
|
207
|
+
44, 61, 63, 64, 92, 95, 108, 117,
|
|
208
|
+
125, 11, 13, 34, 35, 36, 41, 45,
|
|
209
|
+
57, 58, 59, 65, 90, 97, 122, 0,
|
|
210
|
+
9, 10, 32, 41, 43, 44, 61, 63,
|
|
211
|
+
64, 92, 95, 117, 125, 11, 13, 34,
|
|
212
|
+
35, 36, 38, 39, 40, 45, 57, 58,
|
|
213
|
+
59, 65, 90, 97, 122, 0, 9, 10,
|
|
214
|
+
32, 35, 41, 45, 95, 11, 13, 48,
|
|
215
|
+
57, 65, 90, 97, 122, 0
|
|
216
|
+
};
|
|
217
|
+
|
|
218
|
+
static const char _redcloth_attributes_single_lengths[] = {
|
|
219
|
+
0, 4, 3, 8, 4, 3, 4, 8,
|
|
220
|
+
4, 8, 8, 4, 5, 2, 3, 5,
|
|
221
|
+
4, 3, 8, 8, 2, 3, 3, 5,
|
|
222
|
+
6, 6, 6, 11, 6, 12, 12, 11,
|
|
223
|
+
5, 4, 7, 6, 7, 8, 4, 7,
|
|
224
|
+
6, 7, 8, 5, 6, 7, 6, 8,
|
|
225
|
+
9, 9, 9, 14, 10, 15, 15, 14,
|
|
226
|
+
8, 8, 6, 7, 6, 8, 9, 9,
|
|
227
|
+
9, 14, 10, 15, 15, 14, 3, 4,
|
|
228
|
+
7, 6, 7, 7, 6, 7, 6, 8,
|
|
229
|
+
9, 9, 9, 14, 10, 15, 15, 14,
|
|
230
|
+
8
|
|
231
|
+
};
|
|
232
|
+
|
|
233
|
+
static const char _redcloth_attributes_range_lengths[] = {
|
|
234
|
+
0, 1, 1, 4, 1, 1, 1, 4,
|
|
235
|
+
1, 5, 5, 3, 3, 3, 3, 1,
|
|
236
|
+
1, 1, 4, 5, 1, 1, 4, 4,
|
|
237
|
+
4, 4, 4, 6, 4, 6, 6, 7,
|
|
238
|
+
1, 1, 4, 4, 4, 1, 1, 4,
|
|
239
|
+
4, 4, 1, 1, 2, 2, 5, 5,
|
|
240
|
+
5, 5, 5, 7, 5, 7, 7, 8,
|
|
241
|
+
4, 4, 2, 2, 5, 5, 5, 5,
|
|
242
|
+
5, 7, 5, 7, 7, 8, 0, 1,
|
|
243
|
+
4, 4, 4, 1, 2, 2, 5, 5,
|
|
244
|
+
5, 5, 5, 7, 5, 7, 7, 8,
|
|
245
|
+
4
|
|
246
|
+
};
|
|
247
|
+
|
|
248
|
+
static const short _redcloth_attributes_index_offsets[] = {
|
|
249
|
+
0, 0, 6, 11, 24, 30, 35, 41,
|
|
250
|
+
54, 60, 74, 88, 96, 105, 111, 118,
|
|
251
|
+
125, 131, 136, 149, 163, 167, 172, 180,
|
|
252
|
+
190, 201, 212, 223, 241, 252, 271, 290,
|
|
253
|
+
309, 316, 322, 334, 345, 357, 367, 373,
|
|
254
|
+
385, 396, 408, 418, 425, 434, 444, 456,
|
|
255
|
+
470, 485, 500, 515, 537, 553, 576, 599,
|
|
256
|
+
622, 635, 648, 657, 667, 679, 693, 708,
|
|
257
|
+
723, 738, 760, 776, 799, 822, 845, 849,
|
|
258
|
+
855, 867, 878, 890, 899, 908, 918, 930,
|
|
259
|
+
944, 959, 974, 989, 1011, 1027, 1050, 1073,
|
|
260
|
+
1096
|
|
261
|
+
};
|
|
262
|
+
|
|
263
|
+
static const unsigned char _redcloth_attributes_indicies[] = {
|
|
264
|
+
0, 2, 3, 2, 0, 1, 0, 2,
|
|
265
|
+
2, 0, 1, 0, 2, 3, 4, 5,
|
|
266
|
+
6, 7, 7, 0, 7, 7, 7, 1,
|
|
267
|
+
8, 10, 11, 10, 8, 9, 8, 10,
|
|
268
|
+
10, 8, 9, 0, 2, 3, 13, 0,
|
|
269
|
+
12, 8, 10, 11, 14, 15, 16, 17,
|
|
270
|
+
17, 8, 17, 17, 17, 9, 8, 10,
|
|
271
|
+
11, 18, 8, 12, 8, 10, 11, 19,
|
|
272
|
+
20, 20, 21, 22, 8, 20, 20, 20,
|
|
273
|
+
20, 9, 0, 2, 3, 23, 24, 24,
|
|
274
|
+
25, 26, 0, 24, 24, 24, 24, 1,
|
|
275
|
+
27, 29, 27, 27, 27, 27, 27, 28,
|
|
276
|
+
30, 31, 32, 30, 30, 30, 30, 30,
|
|
277
|
+
28, 33, 33, 33, 33, 33, 28, 34,
|
|
278
|
+
35, 35, 35, 35, 35, 28, 28, 28,
|
|
279
|
+
37, 38, 39, 28, 36, 40, 42, 43,
|
|
280
|
+
42, 40, 41, 40, 42, 42, 40, 41,
|
|
281
|
+
40, 42, 43, 44, 45, 46, 47, 47,
|
|
282
|
+
40, 47, 47, 47, 41, 40, 42, 43,
|
|
283
|
+
48, 49, 49, 50, 51, 40, 49, 49,
|
|
284
|
+
49, 49, 41, 52, 52, 52, 28, 53,
|
|
285
|
+
54, 53, 53, 28, 55, 55, 55, 55,
|
|
286
|
+
55, 55, 55, 28, 56, 56, 56, 57,
|
|
287
|
+
58, 56, 56, 56, 56, 28, 56, 56,
|
|
288
|
+
56, 59, 57, 58, 56, 56, 56, 56,
|
|
289
|
+
28, 56, 56, 56, 60, 57, 58, 56,
|
|
290
|
+
56, 56, 56, 28, 56, 61, 56, 56,
|
|
291
|
+
57, 58, 56, 56, 56, 56, 28, 56,
|
|
292
|
+
61, 62, 56, 61, 62, 61, 62, 61,
|
|
293
|
+
63, 58, 61, 56, 61, 56, 56, 61,
|
|
294
|
+
28, 62, 56, 62, 62, 62, 62, 62,
|
|
295
|
+
62, 62, 62, 28, 56, 61, 62, 56,
|
|
296
|
+
61, 62, 61, 62, 61, 64, 63, 58,
|
|
297
|
+
61, 56, 61, 56, 56, 61, 28, 56,
|
|
298
|
+
61, 62, 56, 61, 62, 61, 62, 61,
|
|
299
|
+
65, 63, 58, 61, 56, 61, 56, 56,
|
|
300
|
+
61, 28, 56, 56, 62, 56, 61, 62,
|
|
301
|
+
61, 62, 61, 63, 58, 61, 56, 61,
|
|
302
|
+
61, 56, 56, 61, 28, 28, 28, 67,
|
|
303
|
+
68, 69, 28, 66, 70, 2, 3, 2,
|
|
304
|
+
70, 1, 70, 2, 3, 71, 72, 73,
|
|
305
|
+
73, 70, 73, 73, 73, 1, 70, 2,
|
|
306
|
+
3, 2, 74, 74, 70, 74, 74, 74,
|
|
307
|
+
1, 70, 2, 3, 2, 75, 76, 76,
|
|
308
|
+
70, 76, 76, 76, 1, 70, 2, 3,
|
|
309
|
+
13, 77, 78, 79, 80, 70, 12, 81,
|
|
310
|
+
10, 11, 10, 81, 9, 81, 10, 11,
|
|
311
|
+
82, 83, 84, 84, 81, 84, 84, 84,
|
|
312
|
+
9, 81, 10, 11, 10, 85, 85, 81,
|
|
313
|
+
85, 85, 85, 9, 81, 10, 11, 10,
|
|
314
|
+
86, 87, 87, 81, 87, 87, 87, 9,
|
|
315
|
+
81, 10, 11, 18, 77, 78, 79, 80,
|
|
316
|
+
81, 12, 81, 10, 11, 18, 78, 81,
|
|
317
|
+
12, 81, 10, 11, 10, 88, 88, 81,
|
|
318
|
+
88, 9, 81, 10, 11, 10, 89, 90,
|
|
319
|
+
89, 81, 89, 9, 81, 10, 11, 91,
|
|
320
|
+
92, 92, 81, 92, 92, 92, 92, 9,
|
|
321
|
+
81, 10, 11, 19, 20, 20, 21, 22,
|
|
322
|
+
81, 20, 20, 20, 20, 9, 81, 10,
|
|
323
|
+
11, 19, 20, 20, 93, 21, 22, 81,
|
|
324
|
+
20, 20, 20, 20, 9, 81, 10, 11,
|
|
325
|
+
19, 20, 20, 94, 21, 22, 81, 20,
|
|
326
|
+
20, 20, 20, 9, 81, 10, 11, 19,
|
|
327
|
+
95, 20, 20, 21, 22, 81, 20, 20,
|
|
328
|
+
20, 20, 9, 81, 10, 11, 19, 95,
|
|
329
|
+
96, 20, 95, 96, 95, 96, 95, 97,
|
|
330
|
+
22, 81, 95, 20, 95, 20, 20, 95,
|
|
331
|
+
9, 81, 10, 11, 10, 96, 20, 96,
|
|
332
|
+
96, 96, 96, 81, 96, 96, 96, 96,
|
|
333
|
+
9, 81, 10, 11, 19, 95, 96, 20,
|
|
334
|
+
95, 96, 95, 96, 95, 98, 97, 22,
|
|
335
|
+
81, 95, 20, 95, 20, 20, 95, 9,
|
|
336
|
+
81, 10, 11, 19, 95, 96, 20, 95,
|
|
337
|
+
96, 95, 96, 95, 99, 97, 22, 81,
|
|
338
|
+
95, 20, 95, 20, 20, 95, 9, 81,
|
|
339
|
+
10, 11, 19, 20, 96, 20, 95, 96,
|
|
340
|
+
95, 96, 95, 97, 22, 81, 95, 20,
|
|
341
|
+
95, 95, 20, 20, 95, 9, 81, 10,
|
|
342
|
+
11, 14, 15, 16, 17, 17, 81, 17,
|
|
343
|
+
17, 17, 9, 70, 2, 3, 4, 5,
|
|
344
|
+
6, 7, 7, 70, 7, 7, 7, 1,
|
|
345
|
+
70, 2, 3, 2, 100, 100, 70, 100,
|
|
346
|
+
1, 70, 2, 3, 2, 101, 102, 101,
|
|
347
|
+
70, 101, 1, 70, 2, 3, 103, 104,
|
|
348
|
+
104, 70, 104, 104, 104, 104, 1, 70,
|
|
349
|
+
2, 3, 23, 24, 24, 25, 26, 70,
|
|
350
|
+
24, 24, 24, 24, 1, 70, 2, 3,
|
|
351
|
+
23, 24, 24, 105, 25, 26, 70, 24,
|
|
352
|
+
24, 24, 24, 1, 70, 2, 3, 23,
|
|
353
|
+
24, 24, 106, 25, 26, 70, 24, 24,
|
|
354
|
+
24, 24, 1, 70, 2, 3, 23, 107,
|
|
355
|
+
24, 24, 25, 26, 70, 24, 24, 24,
|
|
356
|
+
24, 1, 70, 2, 3, 23, 107, 108,
|
|
357
|
+
24, 107, 108, 107, 108, 107, 109, 26,
|
|
358
|
+
70, 107, 24, 107, 24, 24, 107, 1,
|
|
359
|
+
70, 2, 3, 2, 108, 24, 108, 108,
|
|
360
|
+
108, 108, 70, 108, 108, 108, 108, 1,
|
|
361
|
+
70, 2, 3, 23, 107, 108, 24, 107,
|
|
362
|
+
108, 107, 108, 107, 110, 109, 26, 70,
|
|
363
|
+
107, 24, 107, 24, 24, 107, 1, 70,
|
|
364
|
+
2, 3, 23, 107, 108, 24, 107, 108,
|
|
365
|
+
107, 108, 107, 111, 109, 26, 70, 107,
|
|
366
|
+
24, 107, 24, 24, 107, 1, 70, 2,
|
|
367
|
+
3, 23, 24, 108, 24, 107, 108, 107,
|
|
368
|
+
108, 107, 109, 26, 70, 107, 24, 107,
|
|
369
|
+
107, 24, 24, 107, 1, 112, 113, 114,
|
|
370
|
+
28, 115, 42, 43, 42, 115, 41, 115,
|
|
371
|
+
42, 43, 116, 117, 118, 118, 115, 118,
|
|
372
|
+
118, 118, 41, 115, 42, 43, 42, 119,
|
|
373
|
+
119, 115, 119, 119, 119, 41, 115, 42,
|
|
374
|
+
43, 42, 120, 121, 121, 115, 121, 121,
|
|
375
|
+
121, 41, 115, 42, 43, 42, 37, 38,
|
|
376
|
+
39, 115, 36, 115, 42, 43, 42, 122,
|
|
377
|
+
122, 115, 122, 41, 115, 42, 43, 42,
|
|
378
|
+
123, 124, 123, 115, 123, 41, 115, 42,
|
|
379
|
+
43, 125, 126, 126, 115, 126, 126, 126,
|
|
380
|
+
126, 41, 115, 42, 43, 48, 49, 49,
|
|
381
|
+
50, 51, 115, 49, 49, 49, 49, 41,
|
|
382
|
+
115, 42, 43, 48, 49, 49, 127, 50,
|
|
383
|
+
51, 115, 49, 49, 49, 49, 41, 115,
|
|
384
|
+
42, 43, 48, 49, 49, 128, 50, 51,
|
|
385
|
+
115, 49, 49, 49, 49, 41, 115, 42,
|
|
386
|
+
43, 48, 129, 49, 49, 50, 51, 115,
|
|
387
|
+
49, 49, 49, 49, 41, 115, 42, 43,
|
|
388
|
+
48, 129, 130, 49, 129, 130, 129, 130,
|
|
389
|
+
129, 131, 51, 115, 129, 49, 129, 49,
|
|
390
|
+
49, 129, 41, 115, 42, 43, 42, 130,
|
|
391
|
+
49, 130, 130, 130, 130, 115, 130, 130,
|
|
392
|
+
130, 130, 41, 115, 42, 43, 48, 129,
|
|
393
|
+
130, 49, 129, 130, 129, 130, 129, 132,
|
|
394
|
+
131, 51, 115, 129, 49, 129, 49, 49,
|
|
395
|
+
129, 41, 115, 42, 43, 48, 129, 130,
|
|
396
|
+
49, 129, 130, 129, 130, 129, 133, 131,
|
|
397
|
+
51, 115, 129, 49, 129, 49, 49, 129,
|
|
398
|
+
41, 115, 42, 43, 48, 49, 130, 49,
|
|
399
|
+
129, 130, 129, 130, 129, 131, 51, 115,
|
|
400
|
+
129, 49, 129, 129, 49, 49, 129, 41,
|
|
401
|
+
115, 42, 43, 44, 45, 46, 47, 47,
|
|
402
|
+
115, 47, 47, 47, 41, 0
|
|
403
|
+
};
|
|
404
|
+
|
|
405
|
+
static const char _redcloth_attributes_trans_targs[] = {
|
|
406
|
+
32, 33, 1, 2, 3, 35, 37, 57,
|
|
407
|
+
32, 38, 4, 5, 38, 6, 7, 40,
|
|
408
|
+
42, 56, 8, 9, 47, 48, 42, 10,
|
|
409
|
+
61, 62, 37, 12, 0, 13, 12, 13,
|
|
410
|
+
15, 14, 15, 14, 71, 72, 76, 78,
|
|
411
|
+
70, 71, 16, 17, 18, 73, 75, 88,
|
|
412
|
+
19, 79, 80, 75, 21, 21, 15, 23,
|
|
413
|
+
23, 24, 15, 25, 26, 27, 28, 29,
|
|
414
|
+
30, 31, 33, 34, 58, 60, 32, 3,
|
|
415
|
+
35, 57, 36, 37, 36, 39, 43, 44,
|
|
416
|
+
46, 32, 7, 40, 56, 41, 42, 41,
|
|
417
|
+
45, 45, 42, 9, 47, 49, 50, 51,
|
|
418
|
+
52, 53, 54, 55, 59, 59, 37, 10,
|
|
419
|
+
61, 63, 64, 65, 66, 67, 68, 69,
|
|
420
|
+
11, 20, 22, 70, 18, 73, 88, 74,
|
|
421
|
+
75, 74, 77, 77, 75, 19, 79, 81,
|
|
422
|
+
82, 83, 84, 85, 86, 87
|
|
423
|
+
};
|
|
424
|
+
|
|
425
|
+
static const char _redcloth_attributes_trans_actions[] = {
|
|
426
|
+
23, 17, 0, 0, 0, 40, 40, 17,
|
|
427
|
+
21, 17, 0, 0, 31, 0, 0, 40,
|
|
428
|
+
40, 17, 0, 0, 17, 17, 49, 0,
|
|
429
|
+
17, 17, 49, 1, 0, 0, 0, 5,
|
|
430
|
+
5, 1, 7, 0, 31, 31, 31, 31,
|
|
431
|
+
19, 17, 0, 0, 0, 40, 40, 17,
|
|
432
|
+
0, 17, 17, 49, 1, 0, 9, 1,
|
|
433
|
+
0, 0, 11, 0, 0, 0, 0, 0,
|
|
434
|
+
0, 0, 34, 34, 34, 34, 28, 1,
|
|
435
|
+
17, 37, 37, 43, 17, 31, 31, 31,
|
|
436
|
+
31, 52, 1, 17, 37, 37, 43, 17,
|
|
437
|
+
37, 17, 46, 1, 37, 17, 17, 17,
|
|
438
|
+
17, 17, 17, 17, 37, 17, 46, 1,
|
|
439
|
+
37, 17, 17, 17, 17, 17, 17, 17,
|
|
440
|
+
3, 3, 3, 25, 1, 17, 37, 37,
|
|
441
|
+
43, 17, 37, 17, 46, 1, 37, 17,
|
|
442
|
+
17, 17, 17, 17, 17, 17
|
|
443
|
+
};
|
|
444
|
+
|
|
445
|
+
static const char _redcloth_attributes_to_state_actions[] = {
|
|
446
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
447
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
448
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
449
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
450
|
+
13, 0, 0, 0, 0, 0, 0, 0,
|
|
451
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
452
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
453
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
454
|
+
0, 0, 0, 0, 0, 0, 13, 0,
|
|
455
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
456
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
457
|
+
0
|
|
458
|
+
};
|
|
459
|
+
|
|
460
|
+
static const char _redcloth_attributes_from_state_actions[] = {
|
|
461
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
462
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
463
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
464
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
465
|
+
15, 0, 0, 0, 0, 0, 0, 0,
|
|
466
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
467
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
468
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
469
|
+
0, 0, 0, 0, 0, 0, 15, 0,
|
|
470
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
471
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
472
|
+
0
|
|
473
|
+
};
|
|
474
|
+
|
|
475
|
+
static const short _redcloth_attributes_eof_trans[] = {
|
|
476
|
+
0, 1, 1, 1, 9, 9, 1, 9,
|
|
477
|
+
9, 9, 1, 0, 0, 0, 0, 0,
|
|
478
|
+
41, 41, 41, 41, 0, 0, 0, 0,
|
|
479
|
+
0, 0, 0, 0, 0, 0, 0, 0,
|
|
480
|
+
0, 71, 71, 71, 71, 71, 82, 82,
|
|
481
|
+
82, 82, 82, 82, 82, 82, 82, 82,
|
|
482
|
+
82, 82, 82, 82, 82, 82, 82, 82,
|
|
483
|
+
82, 71, 71, 71, 71, 71, 71, 71,
|
|
484
|
+
71, 71, 71, 71, 71, 71, 0, 116,
|
|
485
|
+
116, 116, 116, 116, 116, 116, 116, 116,
|
|
486
|
+
116, 116, 116, 116, 116, 116, 116, 116,
|
|
487
|
+
116
|
|
488
|
+
};
|
|
489
|
+
|
|
490
|
+
static const int redcloth_attributes_start = 32;
|
|
491
|
+
static const int redcloth_attributes_error = 0;
|
|
492
|
+
|
|
493
|
+
static const int redcloth_attributes_en_inline = 70;
|
|
494
|
+
static const int redcloth_attributes_en_link_says = 32;
|
|
495
|
+
|
|
496
|
+
|
|
497
|
+
#line 19 "ragel/redcloth_attributes.c.rl"
|
|
498
|
+
|
|
499
|
+
|
|
500
|
+
VALUE
|
|
501
|
+
redcloth_attribute_parser(machine, self, p, pe)
|
|
502
|
+
int machine;
|
|
503
|
+
VALUE self;
|
|
504
|
+
char *p, *pe;
|
|
505
|
+
{
|
|
506
|
+
int cs, act;
|
|
507
|
+
char *ts = 0, *te = 0, *reg = 0, *bck = NULL, *attr_reg = NULL, *eof = NULL;
|
|
508
|
+
VALUE regs = rb_hash_new();
|
|
509
|
+
VALUE attr_regs = rb_hash_new();
|
|
510
|
+
|
|
511
|
+
|
|
512
|
+
#line 513 "ext/redcloth_scan/redcloth_attributes.c"
|
|
513
|
+
{
|
|
514
|
+
cs = redcloth_attributes_start;
|
|
515
|
+
ts = 0;
|
|
516
|
+
te = 0;
|
|
517
|
+
act = 0;
|
|
518
|
+
}
|
|
519
|
+
|
|
520
|
+
#line 33 "ragel/redcloth_attributes.c.rl"
|
|
521
|
+
|
|
522
|
+
cs = machine;
|
|
523
|
+
|
|
524
|
+
|
|
525
|
+
#line 526 "ext/redcloth_scan/redcloth_attributes.c"
|
|
526
|
+
{
|
|
527
|
+
int _klen;
|
|
528
|
+
unsigned int _trans;
|
|
529
|
+
const char *_acts;
|
|
530
|
+
unsigned int _nacts;
|
|
531
|
+
const char *_keys;
|
|
532
|
+
|
|
533
|
+
if ( p == pe )
|
|
534
|
+
goto _test_eof;
|
|
535
|
+
if ( cs == 0 )
|
|
536
|
+
goto _out;
|
|
537
|
+
_resume:
|
|
538
|
+
_acts = _redcloth_attributes_actions + _redcloth_attributes_from_state_actions[cs];
|
|
539
|
+
_nacts = (unsigned int) *_acts++;
|
|
540
|
+
while ( _nacts-- > 0 ) {
|
|
541
|
+
switch ( *_acts++ ) {
|
|
542
|
+
case 12:
|
|
543
|
+
#line 1 "NONE"
|
|
544
|
+
{ts = p;}
|
|
545
|
+
break;
|
|
546
|
+
#line 547 "ext/redcloth_scan/redcloth_attributes.c"
|
|
547
|
+
}
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
_keys = _redcloth_attributes_trans_keys + _redcloth_attributes_key_offsets[cs];
|
|
551
|
+
_trans = _redcloth_attributes_index_offsets[cs];
|
|
552
|
+
|
|
553
|
+
_klen = _redcloth_attributes_single_lengths[cs];
|
|
554
|
+
if ( _klen > 0 ) {
|
|
555
|
+
const char *_lower = _keys;
|
|
556
|
+
const char *_mid;
|
|
557
|
+
const char *_upper = _keys + _klen - 1;
|
|
558
|
+
while (1) {
|
|
559
|
+
if ( _upper < _lower )
|
|
560
|
+
break;
|
|
561
|
+
|
|
562
|
+
_mid = _lower + ((_upper-_lower) >> 1);
|
|
563
|
+
if ( (*p) < *_mid )
|
|
564
|
+
_upper = _mid - 1;
|
|
565
|
+
else if ( (*p) > *_mid )
|
|
566
|
+
_lower = _mid + 1;
|
|
567
|
+
else {
|
|
568
|
+
_trans += (unsigned int)(_mid - _keys);
|
|
569
|
+
goto _match;
|
|
570
|
+
}
|
|
571
|
+
}
|
|
572
|
+
_keys += _klen;
|
|
573
|
+
_trans += _klen;
|
|
574
|
+
}
|
|
575
|
+
|
|
576
|
+
_klen = _redcloth_attributes_range_lengths[cs];
|
|
577
|
+
if ( _klen > 0 ) {
|
|
578
|
+
const char *_lower = _keys;
|
|
579
|
+
const char *_mid;
|
|
580
|
+
const char *_upper = _keys + (_klen<<1) - 2;
|
|
581
|
+
while (1) {
|
|
582
|
+
if ( _upper < _lower )
|
|
583
|
+
break;
|
|
584
|
+
|
|
585
|
+
_mid = _lower + (((_upper-_lower) >> 1) & ~1);
|
|
586
|
+
if ( (*p) < _mid[0] )
|
|
587
|
+
_upper = _mid - 2;
|
|
588
|
+
else if ( (*p) > _mid[1] )
|
|
589
|
+
_lower = _mid + 2;
|
|
590
|
+
else {
|
|
591
|
+
_trans += (unsigned int)((_mid - _keys)>>1);
|
|
592
|
+
goto _match;
|
|
593
|
+
}
|
|
594
|
+
}
|
|
595
|
+
_trans += _klen;
|
|
596
|
+
}
|
|
597
|
+
|
|
598
|
+
_match:
|
|
599
|
+
_trans = _redcloth_attributes_indicies[_trans];
|
|
600
|
+
_eof_trans:
|
|
601
|
+
cs = _redcloth_attributes_trans_targs[_trans];
|
|
602
|
+
|
|
603
|
+
if ( _redcloth_attributes_trans_actions[_trans] == 0 )
|
|
604
|
+
goto _again;
|
|
605
|
+
|
|
606
|
+
_acts = _redcloth_attributes_actions + _redcloth_attributes_trans_actions[_trans];
|
|
607
|
+
_nacts = (unsigned int) *_acts++;
|
|
608
|
+
while ( _nacts-- > 0 )
|
|
609
|
+
{
|
|
610
|
+
switch ( *_acts++ )
|
|
611
|
+
{
|
|
612
|
+
case 0:
|
|
613
|
+
#line 5 "ragel/redcloth_common.rl"
|
|
614
|
+
{ MARK(); }
|
|
615
|
+
break;
|
|
616
|
+
case 1:
|
|
617
|
+
#line 6 "ragel/redcloth_common.rl"
|
|
618
|
+
{ MARK_B(); }
|
|
619
|
+
break;
|
|
620
|
+
case 2:
|
|
621
|
+
#line 7 "ragel/redcloth_common.rl"
|
|
622
|
+
{ MARK_ATTR(); }
|
|
623
|
+
break;
|
|
624
|
+
case 3:
|
|
625
|
+
#line 9 "ragel/redcloth_common.rl"
|
|
626
|
+
{ STORE("text"); }
|
|
627
|
+
break;
|
|
628
|
+
case 4:
|
|
629
|
+
#line 10 "ragel/redcloth_common.rl"
|
|
630
|
+
{ CLEAR_REGS(); RESET_REG(); }
|
|
631
|
+
break;
|
|
632
|
+
case 5:
|
|
633
|
+
#line 35 "ragel/redcloth_common.rl"
|
|
634
|
+
{ STORE_ATTR("class"); }
|
|
635
|
+
break;
|
|
636
|
+
case 6:
|
|
637
|
+
#line 36 "ragel/redcloth_common.rl"
|
|
638
|
+
{ STORE_ATTR("id"); }
|
|
639
|
+
break;
|
|
640
|
+
case 7:
|
|
641
|
+
#line 38 "ragel/redcloth_common.rl"
|
|
642
|
+
{ STORE_ATTR("lang"); }
|
|
643
|
+
break;
|
|
644
|
+
case 8:
|
|
645
|
+
#line 39 "ragel/redcloth_common.rl"
|
|
646
|
+
{ STORE_ATTR("style"); }
|
|
647
|
+
break;
|
|
648
|
+
case 9:
|
|
649
|
+
#line 20 "ragel/redcloth_attributes.rl"
|
|
650
|
+
{ STORE("name"); }
|
|
651
|
+
break;
|
|
652
|
+
case 10:
|
|
653
|
+
#line 21 "ragel/redcloth_attributes.rl"
|
|
654
|
+
{ STORE_B("name_without_attributes"); }
|
|
655
|
+
break;
|
|
656
|
+
case 13:
|
|
657
|
+
#line 1 "NONE"
|
|
658
|
+
{te = p+1;}
|
|
659
|
+
break;
|
|
660
|
+
case 14:
|
|
661
|
+
#line 16 "ragel/redcloth_attributes.rl"
|
|
662
|
+
{te = p;p--;{ SET_ATTRIBUTES(); }}
|
|
663
|
+
break;
|
|
664
|
+
case 15:
|
|
665
|
+
#line 16 "ragel/redcloth_attributes.rl"
|
|
666
|
+
{{p = ((te))-1;}{ SET_ATTRIBUTES(); }}
|
|
667
|
+
break;
|
|
668
|
+
case 16:
|
|
669
|
+
#line 25 "ragel/redcloth_attributes.rl"
|
|
670
|
+
{te = p;p--;{ SET_ATTRIBUTES(); }}
|
|
671
|
+
break;
|
|
672
|
+
case 17:
|
|
673
|
+
#line 26 "ragel/redcloth_attributes.rl"
|
|
674
|
+
{te = p;p--;{ SET_ATTRIBUTE("name_without_attributes", "name"); }}
|
|
675
|
+
break;
|
|
676
|
+
case 18:
|
|
677
|
+
#line 25 "ragel/redcloth_attributes.rl"
|
|
678
|
+
{{p = ((te))-1;}{ SET_ATTRIBUTES(); }}
|
|
679
|
+
break;
|
|
680
|
+
case 19:
|
|
681
|
+
#line 26 "ragel/redcloth_attributes.rl"
|
|
682
|
+
{{p = ((te))-1;}{ SET_ATTRIBUTE("name_without_attributes", "name"); }}
|
|
683
|
+
break;
|
|
684
|
+
#line 685 "ext/redcloth_scan/redcloth_attributes.c"
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
|
|
688
|
+
_again:
|
|
689
|
+
_acts = _redcloth_attributes_actions + _redcloth_attributes_to_state_actions[cs];
|
|
690
|
+
_nacts = (unsigned int) *_acts++;
|
|
691
|
+
while ( _nacts-- > 0 ) {
|
|
692
|
+
switch ( *_acts++ ) {
|
|
693
|
+
case 11:
|
|
694
|
+
#line 1 "NONE"
|
|
695
|
+
{ts = 0;}
|
|
696
|
+
break;
|
|
697
|
+
#line 698 "ext/redcloth_scan/redcloth_attributes.c"
|
|
698
|
+
}
|
|
699
|
+
}
|
|
700
|
+
|
|
701
|
+
if ( cs == 0 )
|
|
702
|
+
goto _out;
|
|
703
|
+
if ( ++p != pe )
|
|
704
|
+
goto _resume;
|
|
705
|
+
_test_eof: {}
|
|
706
|
+
if ( p == eof )
|
|
707
|
+
{
|
|
708
|
+
if ( _redcloth_attributes_eof_trans[cs] > 0 ) {
|
|
709
|
+
_trans = _redcloth_attributes_eof_trans[cs] - 1;
|
|
710
|
+
goto _eof_trans;
|
|
711
|
+
}
|
|
712
|
+
}
|
|
713
|
+
|
|
714
|
+
_out: {}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
#line 37 "ragel/redcloth_attributes.c.rl"
|
|
718
|
+
|
|
719
|
+
return regs;
|
|
720
|
+
}
|
|
721
|
+
|
|
722
|
+
VALUE
|
|
723
|
+
redcloth_attributes(self, str)
|
|
724
|
+
VALUE self, str;
|
|
725
|
+
{
|
|
726
|
+
StringValue(str);
|
|
727
|
+
int cs = redcloth_attributes_en_inline;
|
|
728
|
+
return redcloth_attribute_parser(cs, self, RSTRING_PTR(str), RSTRING_PTR(str) + RSTRING_LEN(str) + 1);
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
VALUE
|
|
732
|
+
redcloth_link_attributes(self, str)
|
|
733
|
+
VALUE self, str;
|
|
734
|
+
{
|
|
735
|
+
StringValue(str);
|
|
736
|
+
int cs = redcloth_attributes_en_link_says;
|
|
737
|
+
return redcloth_attribute_parser(cs, self, RSTRING_PTR(str), RSTRING_PTR(str) + RSTRING_LEN(str) + 1);
|
|
738
|
+
}
|