kramdown 0.1.0 → 0.2.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/COPYING +1 -1
- data/ChangeLog +423 -1
- data/Rakefile +5 -5
- data/VERSION +1 -1
- data/doc/default.template +4 -4
- data/doc/index.page +5 -4
- data/doc/news.feed +1 -1
- data/doc/quickref.page +72 -25
- data/doc/syntax.page +238 -66
- data/doc/tests.page +2 -3
- data/lib/kramdown/converter.rb +41 -10
- data/lib/kramdown/deprecated.rb +41 -0
- data/lib/kramdown/document.rb +17 -8
- data/lib/kramdown/extension.rb +13 -7
- data/lib/kramdown/parser.rb +263 -95
- data/lib/kramdown/version.rb +28 -0
- data/test/run_tests.rb +1 -1
- data/test/test_files.rb +1 -1
- data/test/testcases/block/02_eob/middle.html +1 -0
- data/test/testcases/block/04_header/atx_header.html +8 -0
- data/test/testcases/block/04_header/atx_header.text +8 -0
- data/test/testcases/block/04_header/setext_header.html +6 -0
- data/test/testcases/block/04_header/setext_header.text +9 -0
- data/test/testcases/block/07_horizontal_rule/sepspaces.html +3 -0
- data/test/testcases/block/07_horizontal_rule/sepspaces.text +3 -0
- data/test/testcases/block/07_horizontal_rule/septabs.html +3 -0
- data/test/testcases/block/07_horizontal_rule/septabs.text +3 -0
- data/test/testcases/block/09_html/content_model/deflists.html +6 -0
- data/test/testcases/block/09_html/content_model/deflists.options +1 -0
- data/test/testcases/block/09_html/content_model/deflists.text +6 -0
- data/test/testcases/block/09_html/content_model/tables.html +14 -0
- data/test/testcases/block/09_html/content_model/tables.options +1 -0
- data/test/testcases/block/09_html/content_model/tables.text +14 -0
- data/test/testcases/block/09_html/html_and_codeblocks.options +1 -1
- data/test/testcases/block/09_html/invalid_html_1.html +0 -2
- data/test/testcases/block/09_html/invalid_html_2.html +2 -3
- data/test/testcases/block/09_html/markdown_attr.html +38 -0
- data/test/testcases/block/09_html/markdown_attr.text +38 -0
- data/test/testcases/block/09_html/not_parsed.html +14 -0
- data/test/testcases/block/09_html/not_parsed.text +15 -0
- data/test/testcases/block/09_html/parse_as_raw.html +16 -14
- data/test/testcases/block/09_html/parse_as_raw.options +1 -0
- data/test/testcases/block/09_html/parse_as_raw.text +13 -1
- data/test/testcases/block/09_html/parse_as_span.html +2 -5
- data/test/testcases/block/09_html/parse_as_span.options +1 -0
- data/test/testcases/block/09_html/{auto_parse_block_html.html → parse_block_html.html} +0 -0
- data/test/testcases/block/09_html/parse_block_html.options +1 -0
- data/test/testcases/block/09_html/{auto_parse_block_html.text → parse_block_html.text} +0 -0
- data/test/testcases/block/09_html/simple.html +21 -30
- data/test/testcases/block/09_html/simple.options +1 -0
- data/test/testcases/block/09_html/simple.text +13 -2
- data/test/testcases/block/11_ial/auto_id_and_ial.html +1 -0
- data/test/testcases/block/11_ial/auto_id_and_ial.options +1 -0
- data/test/testcases/block/11_ial/auto_id_and_ial.text +2 -0
- data/test/testcases/block/12_extension/{nokramdown.html → nomarkdown.html} +0 -0
- data/test/testcases/block/12_extension/{nokramdown.text → nomarkdown.text} +4 -4
- data/test/testcases/block/12_extension/{kdoptions.html → options.html} +9 -0
- data/test/testcases/block/12_extension/options.text +28 -0
- data/test/testcases/block/12_extension/{kdoptions2.html → options2.html} +0 -0
- data/test/testcases/block/12_extension/{kdoptions2.text → options2.text} +1 -1
- data/test/testcases/block/13_definition_list/definition_at_beginning.html +1 -0
- data/test/testcases/block/13_definition_list/definition_at_beginning.text +1 -0
- data/test/testcases/block/13_definition_list/multiple_terms.html +13 -0
- data/test/testcases/block/13_definition_list/multiple_terms.text +10 -0
- data/test/testcases/block/13_definition_list/para_wrapping.html +10 -0
- data/test/testcases/block/13_definition_list/para_wrapping.text +6 -0
- data/test/testcases/block/13_definition_list/separated_by_eob.html +8 -0
- data/test/testcases/block/13_definition_list/separated_by_eob.text +5 -0
- data/test/testcases/block/13_definition_list/simple.html +8 -0
- data/test/testcases/block/13_definition_list/simple.text +7 -0
- data/test/testcases/block/13_definition_list/styled_terms.html +4 -0
- data/test/testcases/block/13_definition_list/styled_terms.text +2 -0
- data/test/testcases/block/13_definition_list/too_much_space.html +3 -0
- data/test/testcases/block/13_definition_list/too_much_space.text +4 -0
- data/test/testcases/block/13_definition_list/with_blocks.html +38 -0
- data/test/testcases/block/13_definition_list/with_blocks.text +24 -0
- data/test/testcases/span/05_html/across_lines.html +1 -0
- data/test/testcases/span/05_html/across_lines.text +2 -0
- data/test/testcases/span/05_html/link_with_mailto.html +1 -0
- data/test/testcases/span/05_html/link_with_mailto.text +1 -0
- data/test/testcases/span/05_html/markdown_attr.html +5 -0
- data/test/testcases/span/05_html/markdown_attr.text +5 -0
- data/test/testcases/span/05_html/normal.html +7 -0
- data/test/testcases/span/05_html/normal.text +7 -0
- metadata +56 -12
- data/test/testcases/block/09_html/auto_parse_block_html.options +0 -1
- data/test/testcases/block/12_extension/kdoptions.text +0 -18
@@ -0,0 +1 @@
|
|
1
|
+
:parse_block_html: true
|
@@ -1,4 +1,4 @@
|
|
1
|
-
<div>
|
1
|
+
<div>
|
2
2
|
test
|
3
3
|
</div>
|
4
4
|
|
@@ -37,8 +37,9 @@ para5
|
|
37
37
|
hallo
|
38
38
|
</div>
|
39
39
|
|
40
|
-
<div>hallo<div>test
|
40
|
+
<div>hallo<div>test
|
41
41
|
hallo
|
42
|
+
</div>
|
42
43
|
</div></p>
|
43
44
|
|
44
45
|
<div>
|
@@ -47,6 +48,12 @@ hallo
|
|
47
48
|
hallo
|
48
49
|
</div>
|
49
50
|
|
51
|
+
para6
|
52
|
+
|
53
|
+
<div><div class="clear"></div>
|
54
|
+
Another para.
|
55
|
+
</div>
|
56
|
+
|
50
57
|
<webgen:block name="test" />
|
51
58
|
|
52
59
|
<some:url name:spac='hallo'>doit</some:url>
|
@@ -54,3 +61,7 @@ hallo
|
|
54
61
|
<em>Test</em>
|
55
62
|
|
56
63
|
<p><em>Test</em></p>
|
64
|
+
|
65
|
+
<p><em>Test
|
66
|
+
</em>
|
67
|
+
</p>
|
@@ -0,0 +1 @@
|
|
1
|
+
<h2 id="myid">A header</h2>
|
@@ -0,0 +1 @@
|
|
1
|
+
:auto_ids: true
|
File without changes
|
@@ -1,11 +1,11 @@
|
|
1
1
|
This is a simple paragraph.
|
2
|
-
{::
|
2
|
+
{::nomarkdown:}
|
3
3
|
This *is* not processed
|
4
|
-
{::
|
4
|
+
{::nomarkdown:}
|
5
5
|
And another paragraph
|
6
6
|
|
7
|
-
{::
|
7
|
+
{::nomarkdown:: this='is' .ignore}
|
8
8
|
|
9
9
|
Paragraph
|
10
|
-
{::
|
10
|
+
{::nomarkdown:}
|
11
11
|
Another paragraph
|
@@ -2,6 +2,15 @@
|
|
2
2
|
|
3
3
|
<h1 id="with-header-id">with header id</h1>
|
4
4
|
|
5
|
+
<div>
|
6
|
+
some <span>*para*</span>
|
7
|
+
</div>
|
8
|
+
|
9
|
+
<div>
|
10
|
+
<p>some <span><em>para</em></span></p>
|
11
|
+
</div>
|
12
|
+
|
13
|
+
|
5
14
|
This is some text.
|
6
15
|
|
7
16
|
<p>Some text<sup id="fnref:ab"><a href="#fn:ab" rel="footnote">10</a></sup>.</p>
|
@@ -0,0 +1,28 @@
|
|
1
|
+
# No header id
|
2
|
+
|
3
|
+
{::options:: unusedvar="val"}
|
4
|
+
{::options:: auto_ids="true"}
|
5
|
+
|
6
|
+
# with header id
|
7
|
+
|
8
|
+
<div>
|
9
|
+
some <span>*para*</span>
|
10
|
+
</div>
|
11
|
+
|
12
|
+
{::options:: parse_block_html="true" parse_span_html="true"}
|
13
|
+
|
14
|
+
<div>
|
15
|
+
some <span>*para*</span>
|
16
|
+
</div>
|
17
|
+
|
18
|
+
{::options:: auto_ids="false" filter_html="p em"}
|
19
|
+
|
20
|
+
<p>
|
21
|
+
This is <em>some</em> text.
|
22
|
+
</p>
|
23
|
+
|
24
|
+
{::options:: footnote_nr="10"}
|
25
|
+
|
26
|
+
Some text[^ab].
|
27
|
+
|
28
|
+
[^ab]: Some text.
|
File without changes
|
@@ -0,0 +1 @@
|
|
1
|
+
<p>: no definition</p>
|
@@ -0,0 +1 @@
|
|
1
|
+
: no definition
|
@@ -0,0 +1,38 @@
|
|
1
|
+
<dl>
|
2
|
+
<dt>kram</dt>
|
3
|
+
<dd>this is some
|
4
|
+
text</dd>
|
5
|
+
<dd>
|
6
|
+
<p>this is some
|
7
|
+
more text</p>
|
8
|
+
</dd>
|
9
|
+
<dt>kram</dt>
|
10
|
+
<dd>
|
11
|
+
<blockquote>
|
12
|
+
<p>blockquote</p>
|
13
|
+
</blockquote>
|
14
|
+
</dd>
|
15
|
+
<dt>kram</dt>
|
16
|
+
<dd>
|
17
|
+
<pre><code>code
|
18
|
+
</code></pre>
|
19
|
+
</dd>
|
20
|
+
<dt>kram</dt>
|
21
|
+
<dd>
|
22
|
+
<dl>
|
23
|
+
<dt>kram</dt>
|
24
|
+
<dd>down</dd>
|
25
|
+
</dl>
|
26
|
+
</dd>
|
27
|
+
<dt>kram</dt>
|
28
|
+
<dd>
|
29
|
+
<h1>header</h1>
|
30
|
+
</dd>
|
31
|
+
<dt>kram</dt>
|
32
|
+
<dd>
|
33
|
+
<ul>
|
34
|
+
<li>list</li>
|
35
|
+
<li>items</li>
|
36
|
+
</ul>
|
37
|
+
</dd>
|
38
|
+
</dl>
|
@@ -0,0 +1 @@
|
|
1
|
+
<p>Link: <a href="test foo">test</a></p>
|
@@ -0,0 +1 @@
|
|
1
|
+
<p>Link: <a href="mailto:test@example.com">text</a></p>
|
@@ -0,0 +1 @@
|
|
1
|
+
Link: <a href="mailto:test@example.com">text</a>
|
@@ -10,8 +10,15 @@
|
|
10
10
|
<p>This is <span>tag
|
11
11
|
now </span>.</p>
|
12
12
|
|
13
|
+
<p>This is <span>tag
|
14
|
+
</span> now.</p>
|
15
|
+
|
13
16
|
<p>This is <em>something<span test="do_it" /> strange</em>.</p>
|
14
17
|
|
18
|
+
<p>Auto-closing: <br /></p>
|
19
|
+
|
15
20
|
<p>An invalid tag: <hr></p>
|
16
21
|
|
17
22
|
<p>An invalid </closing> tag.</p>
|
23
|
+
|
24
|
+
<p>A <script>*not*</script> tag.</p>
|
@@ -10,8 +10,15 @@ This is <!-- a
|
|
10
10
|
This is <span>tag
|
11
11
|
now </span>.
|
12
12
|
|
13
|
+
This is <span>tag
|
14
|
+
</span> now.
|
15
|
+
|
13
16
|
This is _something<span test="do_it" /> strange_.
|
14
17
|
|
18
|
+
Auto-closing: <br>
|
19
|
+
|
15
20
|
An invalid tag: <hr>
|
16
21
|
|
17
22
|
An invalid </closing> tag.
|
23
|
+
|
24
|
+
A <script>*not*</script> tag.
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kramdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Thomas Leitner
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-12-03 00:00:00 +01:00
|
13
13
|
default_executable: kramdown
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -40,11 +40,13 @@ files:
|
|
40
40
|
- benchmark/testing.sh
|
41
41
|
- benchmark/timing.sh
|
42
42
|
- lib/kramdown/converter.rb
|
43
|
+
- lib/kramdown/deprecated.rb
|
43
44
|
- lib/kramdown/document.rb
|
44
45
|
- lib/kramdown/error.rb
|
45
46
|
- lib/kramdown/extension.rb
|
46
47
|
- lib/kramdown/parser/registry.rb
|
47
48
|
- lib/kramdown/parser.rb
|
49
|
+
- lib/kramdown/version.rb
|
48
50
|
- lib/kramdown.rb
|
49
51
|
- doc/default.css
|
50
52
|
- doc/default.template
|
@@ -115,6 +117,10 @@ files:
|
|
115
117
|
- test/testcases/block/07_horizontal_rule/error.text
|
116
118
|
- test/testcases/block/07_horizontal_rule/normal.html
|
117
119
|
- test/testcases/block/07_horizontal_rule/normal.text
|
120
|
+
- test/testcases/block/07_horizontal_rule/sepspaces.html
|
121
|
+
- test/testcases/block/07_horizontal_rule/sepspaces.text
|
122
|
+
- test/testcases/block/07_horizontal_rule/septabs.html
|
123
|
+
- test/testcases/block/07_horizontal_rule/septabs.text
|
118
124
|
- test/testcases/block/08_list/escaping.html
|
119
125
|
- test/testcases/block/08_list/escaping.text
|
120
126
|
- test/testcases/block/08_list/list_and_hr.html
|
@@ -135,11 +141,14 @@ files:
|
|
135
141
|
- test/testcases/block/08_list/single_item.text
|
136
142
|
- test/testcases/block/08_list/special_cases.html
|
137
143
|
- test/testcases/block/08_list/special_cases.text
|
138
|
-
- test/testcases/block/09_html/auto_parse_block_html.html
|
139
|
-
- test/testcases/block/09_html/auto_parse_block_html.options
|
140
|
-
- test/testcases/block/09_html/auto_parse_block_html.text
|
141
144
|
- test/testcases/block/09_html/comment.html
|
142
145
|
- test/testcases/block/09_html/comment.text
|
146
|
+
- test/testcases/block/09_html/content_model/deflists.html
|
147
|
+
- test/testcases/block/09_html/content_model/deflists.options
|
148
|
+
- test/testcases/block/09_html/content_model/deflists.text
|
149
|
+
- test/testcases/block/09_html/content_model/tables.html
|
150
|
+
- test/testcases/block/09_html/content_model/tables.options
|
151
|
+
- test/testcases/block/09_html/content_model/tables.text
|
143
152
|
- test/testcases/block/09_html/filtered_html.html
|
144
153
|
- test/testcases/block/09_html/filtered_html.options
|
145
154
|
- test/testcases/block/09_html/filtered_html.text
|
@@ -150,28 +159,57 @@ files:
|
|
150
159
|
- test/testcases/block/09_html/invalid_html_1.text
|
151
160
|
- test/testcases/block/09_html/invalid_html_2.html
|
152
161
|
- test/testcases/block/09_html/invalid_html_2.text
|
162
|
+
- test/testcases/block/09_html/markdown_attr.html
|
163
|
+
- test/testcases/block/09_html/markdown_attr.text
|
164
|
+
- test/testcases/block/09_html/not_parsed.html
|
165
|
+
- test/testcases/block/09_html/not_parsed.text
|
153
166
|
- test/testcases/block/09_html/parse_as_raw.html
|
167
|
+
- test/testcases/block/09_html/parse_as_raw.options
|
154
168
|
- test/testcases/block/09_html/parse_as_raw.text
|
155
169
|
- test/testcases/block/09_html/parse_as_span.html
|
170
|
+
- test/testcases/block/09_html/parse_as_span.options
|
156
171
|
- test/testcases/block/09_html/parse_as_span.text
|
172
|
+
- test/testcases/block/09_html/parse_block_html.html
|
173
|
+
- test/testcases/block/09_html/parse_block_html.options
|
174
|
+
- test/testcases/block/09_html/parse_block_html.text
|
157
175
|
- test/testcases/block/09_html/processing_instruction.html
|
158
176
|
- test/testcases/block/09_html/processing_instruction.text
|
159
177
|
- test/testcases/block/09_html/simple.html
|
178
|
+
- test/testcases/block/09_html/simple.options
|
160
179
|
- test/testcases/block/09_html/simple.text
|
161
180
|
- test/testcases/block/10_ald/simple.html
|
162
181
|
- test/testcases/block/10_ald/simple.text
|
182
|
+
- test/testcases/block/11_ial/auto_id_and_ial.html
|
183
|
+
- test/testcases/block/11_ial/auto_id_and_ial.options
|
184
|
+
- test/testcases/block/11_ial/auto_id_and_ial.text
|
163
185
|
- test/testcases/block/11_ial/simple.html
|
164
186
|
- test/testcases/block/11_ial/simple.text
|
165
187
|
- test/testcases/block/12_extension/comment.html
|
166
188
|
- test/testcases/block/12_extension/comment.text
|
167
189
|
- test/testcases/block/12_extension/ignored.html
|
168
190
|
- test/testcases/block/12_extension/ignored.text
|
169
|
-
- test/testcases/block/12_extension/
|
170
|
-
- test/testcases/block/12_extension/
|
171
|
-
- test/testcases/block/12_extension/
|
172
|
-
- test/testcases/block/12_extension/
|
173
|
-
- test/testcases/block/12_extension/
|
174
|
-
- test/testcases/block/12_extension/
|
191
|
+
- test/testcases/block/12_extension/nomarkdown.html
|
192
|
+
- test/testcases/block/12_extension/nomarkdown.text
|
193
|
+
- test/testcases/block/12_extension/options.html
|
194
|
+
- test/testcases/block/12_extension/options.text
|
195
|
+
- test/testcases/block/12_extension/options2.html
|
196
|
+
- test/testcases/block/12_extension/options2.text
|
197
|
+
- test/testcases/block/13_definition_list/definition_at_beginning.html
|
198
|
+
- test/testcases/block/13_definition_list/definition_at_beginning.text
|
199
|
+
- test/testcases/block/13_definition_list/multiple_terms.html
|
200
|
+
- test/testcases/block/13_definition_list/multiple_terms.text
|
201
|
+
- test/testcases/block/13_definition_list/para_wrapping.html
|
202
|
+
- test/testcases/block/13_definition_list/para_wrapping.text
|
203
|
+
- test/testcases/block/13_definition_list/separated_by_eob.html
|
204
|
+
- test/testcases/block/13_definition_list/separated_by_eob.text
|
205
|
+
- test/testcases/block/13_definition_list/simple.html
|
206
|
+
- test/testcases/block/13_definition_list/simple.text
|
207
|
+
- test/testcases/block/13_definition_list/styled_terms.html
|
208
|
+
- test/testcases/block/13_definition_list/styled_terms.text
|
209
|
+
- test/testcases/block/13_definition_list/too_much_space.html
|
210
|
+
- test/testcases/block/13_definition_list/too_much_space.text
|
211
|
+
- test/testcases/block/13_definition_list/with_blocks.html
|
212
|
+
- test/testcases/block/13_definition_list/with_blocks.text
|
175
213
|
- test/testcases/span/01_link/empty.html
|
176
214
|
- test/testcases/span/01_link/empty.text
|
177
215
|
- test/testcases/span/01_link/image_in_a.html
|
@@ -207,6 +245,12 @@ files:
|
|
207
245
|
- test/testcases/span/04_footnote/footnote_nr.text
|
208
246
|
- test/testcases/span/04_footnote/markers.html
|
209
247
|
- test/testcases/span/04_footnote/markers.text
|
248
|
+
- test/testcases/span/05_html/across_lines.html
|
249
|
+
- test/testcases/span/05_html/across_lines.text
|
250
|
+
- test/testcases/span/05_html/link_with_mailto.html
|
251
|
+
- test/testcases/span/05_html/link_with_mailto.text
|
252
|
+
- test/testcases/span/05_html/markdown_attr.html
|
253
|
+
- test/testcases/span/05_html/markdown_attr.text
|
210
254
|
- test/testcases/span/05_html/normal.html
|
211
255
|
- test/testcases/span/05_html/normal.text
|
212
256
|
- test/testcases/span/autolinks/url_links.html
|
@@ -254,6 +298,6 @@ rubyforge_project: kramdown
|
|
254
298
|
rubygems_version: 1.3.5
|
255
299
|
signing_key:
|
256
300
|
specification_version: 3
|
257
|
-
summary: kramdown is a fast, pure-Ruby
|
301
|
+
summary: kramdown is a fast, pure-Ruby Markdown-superset converter.
|
258
302
|
test_files: []
|
259
303
|
|