kramdown 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of kramdown might be problematic. Click here for more details.
- data/ChangeLog +346 -0
- data/Rakefile +36 -29
- data/VERSION +1 -1
- data/benchmark/testing.sh +1 -1
- data/bin/kramdown +0 -4
- data/doc/index.page +1 -1
- data/doc/links.markdown +4 -0
- data/doc/news.page +2 -1
- data/doc/quickref.page +134 -125
- data/doc/syntax.page +304 -302
- data/lib/kramdown/converter/base.rb +14 -0
- data/lib/kramdown/converter/html.rb +64 -2
- data/lib/kramdown/converter/latex.rb +14 -7
- data/lib/kramdown/document.rb +7 -3
- data/lib/kramdown/options.rb +13 -1
- data/lib/kramdown/parser/kramdown.rb +70 -17
- data/lib/kramdown/parser/kramdown/abbreviation.rb +65 -0
- data/lib/kramdown/parser/kramdown/attribute_list.rb +2 -1
- data/lib/kramdown/parser/kramdown/blank_line.rb +1 -1
- data/lib/kramdown/parser/kramdown/blockquote.rb +1 -1
- data/lib/kramdown/parser/kramdown/codeblock.rb +2 -2
- data/lib/kramdown/parser/kramdown/eob.rb +1 -1
- data/lib/kramdown/parser/kramdown/extension.rb +86 -6
- data/lib/kramdown/parser/kramdown/header.rb +2 -17
- data/lib/kramdown/parser/kramdown/horizontal_rule.rb +1 -1
- data/lib/kramdown/parser/kramdown/list.rb +8 -2
- data/lib/kramdown/parser/kramdown/math.rb +1 -1
- data/lib/kramdown/parser/kramdown/paragraph.rb +1 -1
- data/lib/kramdown/parser/kramdown/smart_quotes.rb +2 -2
- data/lib/kramdown/parser/kramdown/table.rb +1 -1
- data/lib/kramdown/version.rb +1 -1
- data/man/man1/kramdown.1 +77 -63
- data/test/testcases/block/04_header/with_auto_id_prefix.html +3 -0
- data/test/testcases/block/04_header/with_auto_id_prefix.options +2 -0
- data/test/testcases/block/04_header/with_auto_id_prefix.text +3 -0
- data/test/testcases/block/08_list/item_ial.html +9 -0
- data/test/testcases/block/08_list/item_ial.text +5 -0
- data/test/testcases/block/11_ial/auto_id_and_ial.html +1 -1
- data/test/testcases/block/11_ial/auto_id_and_ial.text +1 -1
- data/test/testcases/block/11_ial/simple.html +5 -0
- data/test/testcases/block/11_ial/simple.text +7 -0
- data/test/testcases/block/12_extension/comment.text +5 -5
- data/test/testcases/block/12_extension/ignored.html +0 -2
- data/test/testcases/block/12_extension/ignored.text +3 -6
- data/test/testcases/block/12_extension/nomarkdown.text +4 -4
- data/test/testcases/block/12_extension/options.html +1 -1
- data/test/testcases/block/12_extension/options.text +5 -6
- data/test/testcases/block/12_extension/options2.text +1 -1
- data/test/testcases/block/12_extension/options3.text +1 -1
- data/test/testcases/span/abbreviations/abbrev.html +8 -0
- data/test/testcases/span/abbreviations/abbrev.text +15 -0
- data/test/testcases/span/abbreviations/abbrev_defs.html +2 -0
- data/test/testcases/span/abbreviations/abbrev_defs.text +5 -0
- data/test/testcases/span/extension/comment.html +6 -0
- data/test/testcases/span/extension/comment.text +6 -0
- data/test/testcases/span/extension/ignored.html +1 -0
- data/test/testcases/span/extension/ignored.text +1 -0
- data/test/testcases/span/extension/nomarkdown.html +1 -0
- data/test/testcases/span/extension/nomarkdown.text +1 -0
- data/test/testcases/span/extension/options.html +1 -0
- data/test/testcases/span/extension/options.text +1 -0
- data/test/testcases/span/ial/simple.html +2 -1
- data/test/testcases/span/ial/simple.text +1 -0
- data/test/testcases/span/text_substitutions/typography.html +3 -0
- data/test/testcases/span/text_substitutions/typography.text +3 -0
- metadata +275 -263
data/ChangeLog
CHANGED
@@ -1,3 +1,349 @@
|
|
1
|
+
commit 0e73d548e89a77b0318efa151aa1c6279d7f1c00
|
2
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
3
|
+
Date: Fri May 7 12:17:58 2010 +0200
|
4
|
+
|
5
|
+
Last changes before release
|
6
|
+
|
7
|
+
doc/index.page
|
8
|
+
doc/news/release_0_7_0.page
|
9
|
+
|
10
|
+
commit c83af0ac96ea60aeb5d90afdfe31746106e0de9f
|
11
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
12
|
+
Date: Thu May 6 20:20:20 2010 +0200
|
13
|
+
|
14
|
+
Fixed small problem with :input document option
|
15
|
+
|
16
|
+
lib/kramdown/document.rb
|
17
|
+
|
18
|
+
commit 4c6261dad0dc80235a76866a54ed5a9bf55d6174
|
19
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
20
|
+
Date: Thu May 6 20:19:30 2010 +0200
|
21
|
+
|
22
|
+
Made kramdown parser class better subclass-able and added example subclass
|
23
|
+
|
24
|
+
lib/kramdown/parser/kramdown.rb
|
25
|
+
|
26
|
+
commit 1cb4d538ff62cfb78c88fdf858283c1902b8cd7d
|
27
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
28
|
+
Date: Thu May 6 16:53:11 2010 +0200
|
29
|
+
|
30
|
+
Modified block IAL syntax so that placing an IAL before an element is possible
|
31
|
+
|
32
|
+
doc/news/release_0_7_0.page
|
33
|
+
doc/syntax.page
|
34
|
+
lib/kramdown/parser/kramdown.rb
|
35
|
+
lib/kramdown/parser/kramdown/attribute_list.rb
|
36
|
+
lib/kramdown/parser/kramdown/blank_line.rb
|
37
|
+
lib/kramdown/parser/kramdown/blockquote.rb
|
38
|
+
lib/kramdown/parser/kramdown/codeblock.rb
|
39
|
+
lib/kramdown/parser/kramdown/eob.rb
|
40
|
+
lib/kramdown/parser/kramdown/header.rb
|
41
|
+
lib/kramdown/parser/kramdown/horizontal_rule.rb
|
42
|
+
lib/kramdown/parser/kramdown/list.rb
|
43
|
+
lib/kramdown/parser/kramdown/math.rb
|
44
|
+
lib/kramdown/parser/kramdown/paragraph.rb
|
45
|
+
lib/kramdown/parser/kramdown/table.rb
|
46
|
+
test/testcases/block/11_ial/simple.html
|
47
|
+
test/testcases/block/11_ial/simple.text
|
48
|
+
|
49
|
+
commit d63445c83d7ccb545e649763454e0a5a2619295d
|
50
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
51
|
+
Date: Thu May 6 08:01:21 2010 +0200
|
52
|
+
|
53
|
+
Fixed problem with invalid IDs on news page
|
54
|
+
|
55
|
+
doc/news.page
|
56
|
+
|
57
|
+
commit eb9d114114f0a2333d149e4554805063689dac5a
|
58
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
59
|
+
Date: Thu May 6 08:00:24 2010 +0200
|
60
|
+
|
61
|
+
Updated HTML ToC generation to either create ordered or unordered lists
|
62
|
+
|
63
|
+
doc/converter/html.page
|
64
|
+
lib/kramdown/converter/html.rb
|
65
|
+
|
66
|
+
commit 6fe31bd9900390ae389e884edc85f9f4bdd3070e
|
67
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
68
|
+
Date: Wed May 5 08:27:50 2010 +0200
|
69
|
+
|
70
|
+
Added option for prefixing auto_ids with a string
|
71
|
+
|
72
|
+
doc/news/release_0_7_0.page
|
73
|
+
lib/kramdown/converter/base.rb
|
74
|
+
lib/kramdown/options.rb
|
75
|
+
test/testcases/block/04_header/with_auto_id_prefix.html
|
76
|
+
test/testcases/block/04_header/with_auto_id_prefix.options
|
77
|
+
test/testcases/block/04_header/with_auto_id_prefix.text
|
78
|
+
|
79
|
+
commit e39be57de665f72d83c38c05ac243cb13f316516
|
80
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
81
|
+
Date: Wed May 5 08:08:52 2010 +0200
|
82
|
+
|
83
|
+
Implemented support for applying an IAL to a list item
|
84
|
+
|
85
|
+
doc/news/release_0_7_0.page
|
86
|
+
doc/syntax.page
|
87
|
+
lib/kramdown/parser/kramdown/list.rb
|
88
|
+
test/testcases/block/08_list/item_ial.html
|
89
|
+
test/testcases/block/08_list/item_ial.text
|
90
|
+
|
91
|
+
commit 598478881b809a6f76121ce5741d1105483e3276
|
92
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
93
|
+
Date: Wed May 5 08:03:32 2010 +0200
|
94
|
+
|
95
|
+
Fixed unnecessary recursions when replacing abbreviations
|
96
|
+
|
97
|
+
lib/kramdown/parser/kramdown.rb
|
98
|
+
|
99
|
+
commit 1994f6f62e2317d1a302668b7e237e8554eff47e
|
100
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
101
|
+
Date: Wed May 5 07:56:30 2010 +0200
|
102
|
+
|
103
|
+
Invalid span IALs are now removed from the output
|
104
|
+
|
105
|
+
doc/news/release_0_7_0.page
|
106
|
+
doc/syntax.page
|
107
|
+
lib/kramdown/parser/kramdown/attribute_list.rb
|
108
|
+
test/testcases/span/ial/simple.html
|
109
|
+
test/testcases/span/ial/simple.text
|
110
|
+
|
111
|
+
commit c5a7ce9ca428258f275a9ad82277e8c430f0fd55
|
112
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
113
|
+
Date: Wed May 5 07:29:07 2010 +0200
|
114
|
+
|
115
|
+
Fixed problem with invalid error message
|
116
|
+
|
117
|
+
lib/kramdown/document.rb
|
118
|
+
|
119
|
+
commit 7da28a8abd9fa16dd5c8fc165b02d49af57e6cb8
|
120
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
121
|
+
Date: Tue May 4 20:12:55 2010 +0200
|
122
|
+
|
123
|
+
Added support for automatic generation of ToC
|
124
|
+
|
125
|
+
doc/converter/html.page
|
126
|
+
doc/converter/latex.page
|
127
|
+
doc/news/release_0_7_0.page
|
128
|
+
lib/kramdown/converter/html.rb
|
129
|
+
lib/kramdown/converter/latex.rb
|
130
|
+
|
131
|
+
commit 9c3272eaf95e11d655b3f49fe4c097e5b245c949
|
132
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
133
|
+
Date: Mon May 3 16:22:38 2010 +0200
|
134
|
+
|
135
|
+
Updated testing script to use all available rvm ruby versions
|
136
|
+
|
137
|
+
benchmark/testing.sh
|
138
|
+
|
139
|
+
commit 6776bfccbc1dd82a8dd54109d7dc61b5f6eba1b5
|
140
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
141
|
+
Date: Mon May 3 16:21:58 2010 +0200
|
142
|
+
|
143
|
+
Removed leading colon from option names
|
144
|
+
|
145
|
+
doc/news/release_0_2_0.page
|
146
|
+
doc/news/release_0_7_0.page
|
147
|
+
|
148
|
+
commit 4c32df245a179a338b4295e1f84e8b7fb0b09c59
|
149
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
150
|
+
Date: Mon May 3 16:20:41 2010 +0200
|
151
|
+
|
152
|
+
Fixed ambiguity problem of new extension syntax
|
153
|
+
|
154
|
+
The sequence {:comment} could mean an IAL with a reference to the comment ALD
|
155
|
+
or the beginning of the extension named comment. To resolve this problem,
|
156
|
+
extensions now have to begin with two colons
|
157
|
+
|
158
|
+
doc/syntax.page
|
159
|
+
lib/kramdown/parser/kramdown/extension.rb
|
160
|
+
test/testcases/block/12_extension/comment.text
|
161
|
+
test/testcases/block/12_extension/ignored.text
|
162
|
+
test/testcases/block/12_extension/nomarkdown.text
|
163
|
+
test/testcases/block/12_extension/options.text
|
164
|
+
test/testcases/block/12_extension/options2.text
|
165
|
+
test/testcases/block/12_extension/options3.text
|
166
|
+
test/testcases/span/extension/comment.text
|
167
|
+
test/testcases/span/extension/ignored.text
|
168
|
+
test/testcases/span/extension/nomarkdown.text
|
169
|
+
test/testcases/span/extension/options.text
|
170
|
+
|
171
|
+
commit b48f6ede0237db9bf30cf79a4abd6841a1d70f49
|
172
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
173
|
+
Date: Thu Apr 22 20:52:15 2010 +0200
|
174
|
+
|
175
|
+
Restructured syntax documentation
|
176
|
+
|
177
|
+
doc/syntax.page
|
178
|
+
|
179
|
+
commit 2c0d469ee9365a19b0a79752532e727310cfbe79
|
180
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
181
|
+
Date: Thu Apr 22 07:41:26 2010 +0200
|
182
|
+
|
183
|
+
Updated documentation
|
184
|
+
|
185
|
+
* Option names are now always used without the leading colon
|
186
|
+
* All converter specific options are now described on their respective
|
187
|
+
documentation page and not on the kramdown syntax page anymore
|
188
|
+
|
189
|
+
Rakefile
|
190
|
+
doc/converter/html.page
|
191
|
+
doc/converter/latex.page
|
192
|
+
doc/links.markdown
|
193
|
+
doc/news/release_0_4_0.page
|
194
|
+
doc/parser/kramdown.page
|
195
|
+
doc/syntax.page
|
196
|
+
|
197
|
+
commit c61f553f181f6bda2bcdb3e5e01a3716513e38db
|
198
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
199
|
+
Date: Wed Apr 21 19:34:38 2010 +0200
|
200
|
+
|
201
|
+
Re-implemented custom extensions for docu as webgen tags
|
202
|
+
|
203
|
+
Rakefile
|
204
|
+
doc/quickref.page
|
205
|
+
|
206
|
+
commit 210d61a1ddf5cceb89f5f29b7df4dd57d871cb76
|
207
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
208
|
+
Date: Wed Apr 21 19:01:13 2010 +0200
|
209
|
+
|
210
|
+
Updated block extension code to use new syntax
|
211
|
+
|
212
|
+
The old code is still available and will be removed in a future
|
213
|
+
version of kramdown.
|
214
|
+
|
215
|
+
doc/news/release_0_7_0.page
|
216
|
+
lib/kramdown/parser/kramdown.rb
|
217
|
+
lib/kramdown/parser/kramdown/extension.rb
|
218
|
+
test/testcases/block/12_extension/comment.text
|
219
|
+
test/testcases/block/12_extension/ignored.html
|
220
|
+
test/testcases/block/12_extension/ignored.text
|
221
|
+
test/testcases/block/12_extension/nomarkdown.text
|
222
|
+
test/testcases/block/12_extension/options.text
|
223
|
+
test/testcases/block/12_extension/options2.text
|
224
|
+
test/testcases/block/12_extension/options3.text
|
225
|
+
|
226
|
+
commit 2f7b852c80a185f63f8ea77bf56833c345669264
|
227
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
228
|
+
Date: Wed Apr 21 08:44:00 2010 +0200
|
229
|
+
|
230
|
+
Implemented support for span extension using the new syntax
|
231
|
+
|
232
|
+
doc/news/release_0_7_0.page
|
233
|
+
doc/quickref.page
|
234
|
+
doc/syntax.page
|
235
|
+
lib/kramdown/parser/kramdown.rb
|
236
|
+
lib/kramdown/parser/kramdown/extension.rb
|
237
|
+
test/testcases/span/extension/comment.html
|
238
|
+
test/testcases/span/extension/comment.text
|
239
|
+
test/testcases/span/extension/ignored.html
|
240
|
+
test/testcases/span/extension/ignored.text
|
241
|
+
test/testcases/span/extension/nomarkdown.html
|
242
|
+
test/testcases/span/extension/nomarkdown.text
|
243
|
+
test/testcases/span/extension/options.html
|
244
|
+
test/testcases/span/extension/options.text
|
245
|
+
|
246
|
+
commit 4bc26bba49b53259c5bea118459298aaf0eca663
|
247
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
248
|
+
Date: Tue Apr 20 17:44:45 2010 +0200
|
249
|
+
|
250
|
+
Added deprecation warning for old extension parser
|
251
|
+
|
252
|
+
doc/news/release_0_7_0.page
|
253
|
+
lib/kramdown/parser/kramdown/extension.rb
|
254
|
+
|
255
|
+
commit 6ffc5f341f26637391c669c9f47b59cffde88adc
|
256
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
257
|
+
Date: Sun Apr 18 08:33:34 2010 +0200
|
258
|
+
|
259
|
+
Fixed check-in of invalid file
|
260
|
+
|
261
|
+
test/testcases/span/abbreviations/.abbrev.html.swp
|
262
|
+
|
263
|
+
commit f0d4f182db8b04d631da27fe2ec1fb8347f6b50b
|
264
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
265
|
+
Date: Sun Apr 18 08:32:59 2010 +0200
|
266
|
+
|
267
|
+
Moved option :auto_ids from parser to converters
|
268
|
+
|
269
|
+
doc/news/release_0_7_0.page
|
270
|
+
doc/quickref.page
|
271
|
+
lib/kramdown/converter/base.rb
|
272
|
+
lib/kramdown/converter/html.rb
|
273
|
+
lib/kramdown/converter/latex.rb
|
274
|
+
lib/kramdown/options.rb
|
275
|
+
lib/kramdown/parser/kramdown/header.rb
|
276
|
+
test/testcases/block/11_ial/auto_id_and_ial.html
|
277
|
+
test/testcases/block/11_ial/auto_id_and_ial.text
|
278
|
+
test/testcases/block/12_extension/options.html
|
279
|
+
test/testcases/block/12_extension/options.text
|
280
|
+
|
281
|
+
commit e846fd69fe278880c1bb2559f0378c31e64b1cfe
|
282
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
283
|
+
Date: Fri Apr 16 11:58:12 2010 +0200
|
284
|
+
|
285
|
+
Added syntax support for abbreviations
|
286
|
+
|
287
|
+
doc/news/release_0_7_0.page
|
288
|
+
doc/quickref.page
|
289
|
+
doc/syntax.page
|
290
|
+
lib/kramdown/converter/html.rb
|
291
|
+
lib/kramdown/converter/latex.rb
|
292
|
+
lib/kramdown/parser/kramdown.rb
|
293
|
+
lib/kramdown/parser/kramdown/abbreviation.rb
|
294
|
+
test/testcases/span/abbreviations/.abbrev.html.swp
|
295
|
+
test/testcases/span/abbreviations/abbrev.html
|
296
|
+
test/testcases/span/abbreviations/abbrev.text
|
297
|
+
test/testcases/span/abbreviations/abbrev_defs.html
|
298
|
+
test/testcases/span/abbreviations/abbrev_defs.text
|
299
|
+
|
300
|
+
commit 719f35ee0046328f661581915d10899ba21cd39b
|
301
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
302
|
+
Date: Fri Apr 9 10:26:04 2010 +0200
|
303
|
+
|
304
|
+
Fixed special case of smart quotes parsing
|
305
|
+
|
306
|
+
doc/news/release_0_7_0.page
|
307
|
+
lib/kramdown/parser/kramdown/smart_quotes.rb
|
308
|
+
test/testcases/span/text_substitutions/typography.html
|
309
|
+
test/testcases/span/text_substitutions/typography.text
|
310
|
+
|
311
|
+
commit 6e9dd27242cb193900c975822d534a20a5754144
|
312
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
313
|
+
Date: Fri Apr 9 10:25:29 2010 +0200
|
314
|
+
|
315
|
+
Fixed dependency problem in Rakefile
|
316
|
+
|
317
|
+
Rakefile should always load fine even if webgen is not installed.
|
318
|
+
|
319
|
+
Rakefile
|
320
|
+
|
321
|
+
commit d6c22539b6c8513f059f27e5560831dc49a5b578
|
322
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
323
|
+
Date: Fri Apr 9 10:18:57 2010 +0200
|
324
|
+
|
325
|
+
Fixed problem with invalid error reporting
|
326
|
+
|
327
|
+
lib/kramdown/document.rb
|
328
|
+
|
329
|
+
commit 6a957f7a635b26677e80efb68538238eaba07fd6
|
330
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
331
|
+
Date: Wed Apr 7 17:39:44 2010 +0200
|
332
|
+
|
333
|
+
Removed deprecated CLI option -f
|
334
|
+
|
335
|
+
bin/kramdown
|
336
|
+
doc/news/release_0_7_0.page
|
337
|
+
|
338
|
+
commit 7a20c25cf1490f84a4ddca12431d4df282326d6f
|
339
|
+
Author: Thomas Leitner <t_leitner@gmx.at>
|
340
|
+
Date: Wed Apr 7 09:44:49 2010 +0200
|
341
|
+
|
342
|
+
Bumped version number and added news file
|
343
|
+
|
344
|
+
doc/news/release_0_7_0.page
|
345
|
+
lib/kramdown/version.rb
|
346
|
+
|
1
347
|
commit 01986057b7e458aaf352f7d8fddb587ae2fcc16e
|
2
348
|
Author: Thomas Leitner <t_leitner@gmx.at>
|
3
349
|
Date: Tue Apr 6 12:13:36 2010 +0200
|
data/Rakefile
CHANGED
@@ -62,7 +62,11 @@ if defined? Webgen
|
|
62
62
|
config['output'] = ['Webgen::Output::FileSystem', 'htmldoc']
|
63
63
|
config.default_processing_pipeline('Page' => 'erb,tags,kramdown,blocks,fragments')
|
64
64
|
config.optionsdisplay.items [], :mandatory => 'default'
|
65
|
+
config.kdlink.oid nil, :mandatory => true
|
66
|
+
config.kdlink.part nil, :mandatory => true
|
65
67
|
config['contentprocessor.tags.map']['options'] = 'OptionsDisplay'
|
68
|
+
config['contentprocessor.tags.map']['kdexample'] = 'KDExample'
|
69
|
+
config['contentprocessor.tags.map']['kdlink'] = 'KDLink'
|
66
70
|
end
|
67
71
|
end
|
68
72
|
|
@@ -272,45 +276,48 @@ task :clobber => ['dev:clobber']
|
|
272
276
|
|
273
277
|
# Helper methods and misc ###################################################################
|
274
278
|
|
279
|
+
if defined? Webgen
|
275
280
|
|
276
|
-
class OptionsDisplay
|
281
|
+
class OptionsDisplay
|
277
282
|
|
278
|
-
|
283
|
+
include Webgen::Tag::Base
|
279
284
|
|
280
|
-
|
281
|
-
|
282
|
-
|
283
|
-
|
284
|
-
|
285
|
-
|
286
|
-
|
287
|
-
|
288
|
-
|
289
|
-
|
285
|
+
def call(tag, body, context)
|
286
|
+
param('optionsdisplay.items').collect do |opt|
|
287
|
+
Kramdown::Options.definitions[opt]
|
288
|
+
end.collect do |term|
|
289
|
+
lines = term.desc.split(/\n/)
|
290
|
+
first = lines.shift
|
291
|
+
rest = lines[0..-2].collect {|l| " " + l}.join("\n")
|
292
|
+
"`#{term.name}`\n: #{first}\n#{rest}"
|
293
|
+
end.join("\n")
|
294
|
+
end
|
290
295
|
|
291
|
-
end
|
296
|
+
end
|
292
297
|
|
298
|
+
require 'cgi'
|
293
299
|
|
294
|
-
|
300
|
+
class KDExample
|
295
301
|
|
296
|
-
|
302
|
+
include Webgen::Tag::Base
|
297
303
|
|
298
|
-
def
|
299
|
-
|
300
|
-
|
301
|
-
|
302
|
-
|
303
|
-
|
304
|
-
wrap.children.last.children << Element.new(:raw, doc.to_html)
|
305
|
-
parser.tree.children << wrap
|
306
|
-
parser.tree.children << Element.new(:html_element, 'div', :attr => {'class' => 'clear'})
|
304
|
+
def call(tag, body, context)
|
305
|
+
result = ::Kramdown::Document.new(body).to_html
|
306
|
+
before = "<pre class='kdexample-before'>#{body}<code>\n</code></pre>"
|
307
|
+
after = "<pre class='kdexample-after-source'>#{CGI::escapeHTML(result)}<code>\n</code></pre>"
|
308
|
+
afterhtml = "<div class='kdexample-after-live'>#{result}</div>"
|
309
|
+
"<div class='kdexample'>#{before}#{after}#{afterhtml}\n</div><div class='clear'></div>"
|
307
310
|
end
|
308
311
|
|
309
|
-
|
310
|
-
|
311
|
-
|
312
|
-
|
313
|
-
|
312
|
+
end
|
313
|
+
|
314
|
+
class KDLink
|
315
|
+
|
316
|
+
include Webgen::Tag::Base
|
317
|
+
|
318
|
+
def call(tag, body, context)
|
319
|
+
link = "<a href='syntax.html##{param('kdlink.oid')}'>→ Syntax for #{param('kdlink.part')}</a>"
|
320
|
+
"<div class='kdsyntaxlink'>#{link}\n</div>"
|
314
321
|
end
|
315
322
|
|
316
323
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.7.0
|