kramdown 0.1.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/AUTHORS +1 -0
- data/COPYING +24 -0
- data/ChangeLog +1416 -0
- data/GPL +674 -0
- data/README +20 -0
- data/Rakefile +300 -0
- data/VERSION +1 -0
- data/benchmark/benchmark.rb +33 -0
- data/benchmark/mdbasics.text +306 -0
- data/benchmark/mdsyntax.text +888 -0
- data/benchmark/testing.sh +9 -0
- data/benchmark/timing.sh +10 -0
- data/bin/kramdown +26 -0
- data/doc/default.css +293 -0
- data/doc/default.template +78 -0
- data/doc/index.page +89 -0
- data/doc/installation.page +90 -0
- data/doc/news.feed +10 -0
- data/doc/news.page +27 -0
- data/doc/quickref.page +474 -0
- data/doc/syntax.page +1089 -0
- data/doc/tests.page +44 -0
- data/doc/virtual +2 -0
- data/lib/kramdown.rb +23 -0
- data/lib/kramdown/converter.rb +215 -0
- data/lib/kramdown/document.rb +150 -0
- data/lib/kramdown/error.rb +27 -0
- data/lib/kramdown/extension.rb +73 -0
- data/lib/kramdown/parser.rb +1056 -0
- data/lib/kramdown/parser/registry.rb +62 -0
- data/setup.rb +1585 -0
- data/test/run_tests.rb +58 -0
- data/test/test_files.rb +39 -0
- data/test/testcases/block/01_blank_line/spaces.html +1 -0
- data/test/testcases/block/01_blank_line/spaces.text +3 -0
- data/test/testcases/block/01_blank_line/tabs.html +1 -0
- data/test/testcases/block/01_blank_line/tabs.text +6 -0
- data/test/testcases/block/02_eob/beginning.html +1 -0
- data/test/testcases/block/02_eob/beginning.text +3 -0
- data/test/testcases/block/02_eob/end.html +1 -0
- data/test/testcases/block/02_eob/end.text +3 -0
- data/test/testcases/block/02_eob/middle.html +1 -0
- data/test/testcases/block/02_eob/middle.text +5 -0
- data/test/testcases/block/03_paragraph/indented.html +18 -0
- data/test/testcases/block/03_paragraph/indented.text +19 -0
- data/test/testcases/block/03_paragraph/no_newline_at_end.html +5 -0
- data/test/testcases/block/03_paragraph/no_newline_at_end.text +5 -0
- data/test/testcases/block/03_paragraph/one_para.html +1 -0
- data/test/testcases/block/03_paragraph/one_para.text +1 -0
- data/test/testcases/block/03_paragraph/two_para.html +4 -0
- data/test/testcases/block/03_paragraph/two_para.text +4 -0
- data/test/testcases/block/04_header/atx_header.html +26 -0
- data/test/testcases/block/04_header/atx_header.text +24 -0
- data/test/testcases/block/04_header/atx_header_no_newline_at_end.html +1 -0
- data/test/testcases/block/04_header/atx_header_no_newline_at_end.text +1 -0
- data/test/testcases/block/04_header/setext_header.html +25 -0
- data/test/testcases/block/04_header/setext_header.text +27 -0
- data/test/testcases/block/04_header/setext_header_no_newline_at_end.html +1 -0
- data/test/testcases/block/04_header/setext_header_no_newline_at_end.text +2 -0
- data/test/testcases/block/04_header/with_auto_ids.html +17 -0
- data/test/testcases/block/04_header/with_auto_ids.options +1 -0
- data/test/testcases/block/04_header/with_auto_ids.text +19 -0
- data/test/testcases/block/05_blockquote/indented.html +25 -0
- data/test/testcases/block/05_blockquote/indented.text +14 -0
- data/test/testcases/block/05_blockquote/nested.html +9 -0
- data/test/testcases/block/05_blockquote/nested.text +5 -0
- data/test/testcases/block/05_blockquote/no_newline_at_end.html +4 -0
- data/test/testcases/block/05_blockquote/no_newline_at_end.text +2 -0
- data/test/testcases/block/05_blockquote/only_first_quoted.html +8 -0
- data/test/testcases/block/05_blockquote/only_first_quoted.text +4 -0
- data/test/testcases/block/05_blockquote/with_code_blocks.html +15 -0
- data/test/testcases/block/05_blockquote/with_code_blocks.text +11 -0
- data/test/testcases/block/06_codeblock/error.html +4 -0
- data/test/testcases/block/06_codeblock/error.text +4 -0
- data/test/testcases/block/06_codeblock/no_newline_at_end.html +2 -0
- data/test/testcases/block/06_codeblock/no_newline_at_end.text +1 -0
- data/test/testcases/block/06_codeblock/normal.html +13 -0
- data/test/testcases/block/06_codeblock/normal.text +10 -0
- data/test/testcases/block/06_codeblock/tilde_syntax.html +7 -0
- data/test/testcases/block/06_codeblock/tilde_syntax.text +9 -0
- data/test/testcases/block/06_codeblock/whitespace.html +3 -0
- data/test/testcases/block/06_codeblock/whitespace.text +3 -0
- data/test/testcases/block/06_codeblock/with_blank_line.html +13 -0
- data/test/testcases/block/06_codeblock/with_blank_line.text +11 -0
- data/test/testcases/block/06_codeblock/with_eob_marker.html +6 -0
- data/test/testcases/block/06_codeblock/with_eob_marker.text +5 -0
- data/test/testcases/block/07_horizontal_rule/error.html +7 -0
- data/test/testcases/block/07_horizontal_rule/error.text +7 -0
- data/test/testcases/block/07_horizontal_rule/normal.html +19 -0
- data/test/testcases/block/07_horizontal_rule/normal.text +19 -0
- data/test/testcases/block/08_list/escaping.html +17 -0
- data/test/testcases/block/08_list/escaping.text +17 -0
- data/test/testcases/block/08_list/list_and_hr.html +9 -0
- data/test/testcases/block/08_list/list_and_hr.text +5 -0
- data/test/testcases/block/08_list/list_and_others.html +38 -0
- data/test/testcases/block/08_list/list_and_others.text +25 -0
- data/test/testcases/block/08_list/mixed.html +111 -0
- data/test/testcases/block/08_list/mixed.text +66 -0
- data/test/testcases/block/08_list/nested.html +17 -0
- data/test/testcases/block/08_list/nested.text +7 -0
- data/test/testcases/block/08_list/other_first_element.html +39 -0
- data/test/testcases/block/08_list/other_first_element.text +18 -0
- data/test/testcases/block/08_list/simple_ol.html +19 -0
- data/test/testcases/block/08_list/simple_ol.text +13 -0
- data/test/testcases/block/08_list/simple_ul.html +61 -0
- data/test/testcases/block/08_list/simple_ul.text +43 -0
- data/test/testcases/block/08_list/single_item.html +3 -0
- data/test/testcases/block/08_list/single_item.text +1 -0
- data/test/testcases/block/08_list/special_cases.html +29 -0
- data/test/testcases/block/08_list/special_cases.text +19 -0
- data/test/testcases/block/09_html/auto_parse_block_html.html +17 -0
- data/test/testcases/block/09_html/auto_parse_block_html.options +1 -0
- data/test/testcases/block/09_html/auto_parse_block_html.text +14 -0
- data/test/testcases/block/09_html/comment.html +12 -0
- data/test/testcases/block/09_html/comment.text +12 -0
- data/test/testcases/block/09_html/filtered_html.html +1 -0
- data/test/testcases/block/09_html/filtered_html.options +1 -0
- data/test/testcases/block/09_html/filtered_html.text +1 -0
- data/test/testcases/block/09_html/html_and_codeblocks.html +15 -0
- data/test/testcases/block/09_html/html_and_codeblocks.options +1 -0
- data/test/testcases/block/09_html/html_and_codeblocks.text +13 -0
- data/test/testcases/block/09_html/invalid_html_1.html +5 -0
- data/test/testcases/block/09_html/invalid_html_1.text +5 -0
- data/test/testcases/block/09_html/invalid_html_2.html +6 -0
- data/test/testcases/block/09_html/invalid_html_2.text +5 -0
- data/test/testcases/block/09_html/parse_as_raw.html +26 -0
- data/test/testcases/block/09_html/parse_as_raw.text +16 -0
- data/test/testcases/block/09_html/parse_as_span.html +12 -0
- data/test/testcases/block/09_html/parse_as_span.text +7 -0
- data/test/testcases/block/09_html/processing_instruction.html +12 -0
- data/test/testcases/block/09_html/processing_instruction.text +12 -0
- data/test/testcases/block/09_html/simple.html +78 -0
- data/test/testcases/block/09_html/simple.text +56 -0
- data/test/testcases/block/10_ald/simple.html +2 -0
- data/test/testcases/block/10_ald/simple.text +8 -0
- data/test/testcases/block/11_ial/simple.html +17 -0
- data/test/testcases/block/11_ial/simple.text +25 -0
- data/test/testcases/block/12_extension/comment.html +5 -0
- data/test/testcases/block/12_extension/comment.text +11 -0
- data/test/testcases/block/12_extension/ignored.html +6 -0
- data/test/testcases/block/12_extension/ignored.text +11 -0
- data/test/testcases/block/12_extension/kdoptions.html +15 -0
- data/test/testcases/block/12_extension/kdoptions.text +18 -0
- data/test/testcases/block/12_extension/kdoptions2.html +10 -0
- data/test/testcases/block/12_extension/kdoptions2.text +5 -0
- data/test/testcases/block/12_extension/nokramdown.html +6 -0
- data/test/testcases/block/12_extension/nokramdown.text +11 -0
- data/test/testcases/span/01_link/empty.html +3 -0
- data/test/testcases/span/01_link/empty.text +3 -0
- data/test/testcases/span/01_link/image_in_a.html +5 -0
- data/test/testcases/span/01_link/image_in_a.text +5 -0
- data/test/testcases/span/01_link/imagelinks.html +12 -0
- data/test/testcases/span/01_link/imagelinks.text +14 -0
- data/test/testcases/span/01_link/inline.html +40 -0
- data/test/testcases/span/01_link/inline.text +42 -0
- data/test/testcases/span/01_link/link_defs.html +8 -0
- data/test/testcases/span/01_link/link_defs.text +22 -0
- data/test/testcases/span/01_link/links_with_angle_brackets.html +3 -0
- data/test/testcases/span/01_link/links_with_angle_brackets.text +3 -0
- data/test/testcases/span/01_link/reference.html +32 -0
- data/test/testcases/span/01_link/reference.text +42 -0
- data/test/testcases/span/02_emphasis/empty.html +3 -0
- data/test/testcases/span/02_emphasis/empty.text +3 -0
- data/test/testcases/span/02_emphasis/errors.html +9 -0
- data/test/testcases/span/02_emphasis/errors.text +9 -0
- data/test/testcases/span/02_emphasis/nesting.html +34 -0
- data/test/testcases/span/02_emphasis/nesting.text +30 -0
- data/test/testcases/span/02_emphasis/normal.html +42 -0
- data/test/testcases/span/02_emphasis/normal.text +42 -0
- data/test/testcases/span/03_codespan/empty.html +5 -0
- data/test/testcases/span/03_codespan/empty.text +5 -0
- data/test/testcases/span/03_codespan/errors.html +1 -0
- data/test/testcases/span/03_codespan/errors.text +1 -0
- data/test/testcases/span/03_codespan/normal.html +16 -0
- data/test/testcases/span/03_codespan/normal.text +16 -0
- data/test/testcases/span/04_footnote/definitions.html +14 -0
- data/test/testcases/span/04_footnote/definitions.text +18 -0
- data/test/testcases/span/04_footnote/footnote_nr.html +12 -0
- data/test/testcases/span/04_footnote/footnote_nr.options +1 -0
- data/test/testcases/span/04_footnote/footnote_nr.text +4 -0
- data/test/testcases/span/04_footnote/markers.html +46 -0
- data/test/testcases/span/04_footnote/markers.text +26 -0
- data/test/testcases/span/05_html/normal.html +17 -0
- data/test/testcases/span/05_html/normal.text +17 -0
- data/test/testcases/span/autolinks/url_links.html +9 -0
- data/test/testcases/span/autolinks/url_links.text +9 -0
- data/test/testcases/span/escaped_chars/normal.html +33 -0
- data/test/testcases/span/escaped_chars/normal.text +33 -0
- data/test/testcases/span/ial/simple.html +5 -0
- data/test/testcases/span/ial/simple.text +5 -0
- data/test/testcases/span/line_breaks/normal.html +11 -0
- data/test/testcases/span/line_breaks/normal.text +11 -0
- data/test/testcases/span/text_substitutions/entities.html +4 -0
- data/test/testcases/span/text_substitutions/entities.text +4 -0
- data/test/testcases/span/text_substitutions/greaterthan.html +1 -0
- data/test/testcases/span/text_substitutions/greaterthan.text +1 -0
- data/test/testcases/span/text_substitutions/lowerthan.html +1 -0
- data/test/testcases/span/text_substitutions/lowerthan.text +1 -0
- data/test/testcases/span/text_substitutions/typography.html +3 -0
- data/test/testcases/span/text_substitutions/typography.text +3 -0
- metadata +259 -0
@@ -0,0 +1 @@
|
|
1
|
+
:auto_parse_block_html: false
|
@@ -0,0 +1,26 @@
|
|
1
|
+
<p>This is some para.</p>
|
2
|
+
<script type="javascript">
|
3
|
+
This *text* must not be converted.
|
4
|
+
</script>
|
5
|
+
|
6
|
+
<script>
|
7
|
+
Not *parsed* here
|
8
|
+
</script>
|
9
|
+
|
10
|
+
<script>
|
11
|
+
*not*
|
12
|
+
</script>
|
13
|
+
<p>
|
14
|
+
<em>parsed</em>
|
15
|
+
This too
|
16
|
+
</p>
|
17
|
+
|
18
|
+
<script>
|
19
|
+
*not*<p>*parsed*
|
20
|
+
This too
|
21
|
+
</p>
|
22
|
+
</script>
|
23
|
+
|
24
|
+
<script>
|
25
|
+
something<p>*not*</p>
|
26
|
+
</script>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
This is some para.
|
2
|
+
<script type="javascript">
|
3
|
+
This *text* must not be converted.
|
4
|
+
</script>
|
5
|
+
|
6
|
+
<script>Not *parsed* here</script>
|
7
|
+
|
8
|
+
<script>*not*</script><p>*parsed*
|
9
|
+
This too
|
10
|
+
</p>
|
11
|
+
|
12
|
+
<script>*not*<p>*parsed*
|
13
|
+
This too
|
14
|
+
</p></script>
|
15
|
+
|
16
|
+
<script>something<p>*not*</p></script>
|
@@ -0,0 +1,78 @@
|
|
1
|
+
<div>
|
2
|
+
<p>test</p>
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<p>
|
6
|
+
para2
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<div id="test">
|
10
|
+
<p>
|
11
|
+
tes
|
12
|
+
</p>
|
13
|
+
|
14
|
+
<p>
|
15
|
+
test
|
16
|
+
weiter
|
17
|
+
</p>
|
18
|
+
</div>
|
19
|
+
|
20
|
+
<p>para4</p>
|
21
|
+
|
22
|
+
<div>
|
23
|
+
<div>
|
24
|
+
<div>
|
25
|
+
<p>foo</p>
|
26
|
+
</div>
|
27
|
+
<div style=" "></div>
|
28
|
+
</div>
|
29
|
+
<div>
|
30
|
+
bar
|
31
|
+
</div>
|
32
|
+
</div>
|
33
|
+
|
34
|
+
<p>para5</p>
|
35
|
+
|
36
|
+
<div>
|
37
|
+
id
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div>
|
41
|
+
id
|
42
|
+
</div>
|
43
|
+
|
44
|
+
<div>
|
45
|
+
hallo</p>
|
46
|
+
<div>
|
47
|
+
test
|
48
|
+
</div>
|
49
|
+
<p>hallo</p>
|
50
|
+
</div>
|
51
|
+
|
52
|
+
<div>
|
53
|
+
hallo
|
54
|
+
<div>
|
55
|
+
test
|
56
|
+
</div>
|
57
|
+
<p>hallo</p>
|
58
|
+
</div>
|
59
|
+
</p>
|
60
|
+
|
61
|
+
<div>
|
62
|
+
<p>hallo</p>
|
63
|
+
</div>
|
64
|
+
<div>
|
65
|
+
<p>hallo</p>
|
66
|
+
</div>
|
67
|
+
|
68
|
+
<webgen:block name="test" />
|
69
|
+
|
70
|
+
<some:url name:spac="hallo">
|
71
|
+
doit
|
72
|
+
</some:url>
|
73
|
+
|
74
|
+
<p><em>Test</em></p>
|
75
|
+
|
76
|
+
<p>
|
77
|
+
<em>Test</em>
|
78
|
+
</p>
|
@@ -0,0 +1,56 @@
|
|
1
|
+
<div>
|
2
|
+
test
|
3
|
+
</div>
|
4
|
+
|
5
|
+
<p>
|
6
|
+
para2
|
7
|
+
</p>
|
8
|
+
|
9
|
+
<div id='test'>
|
10
|
+
<p>tes</p>
|
11
|
+
|
12
|
+
<p>test
|
13
|
+
weiter
|
14
|
+
</p>
|
15
|
+
</div>
|
16
|
+
|
17
|
+
para4
|
18
|
+
|
19
|
+
<div>
|
20
|
+
<div>
|
21
|
+
<div>
|
22
|
+
foo
|
23
|
+
</div>
|
24
|
+
<div style=" "></div>
|
25
|
+
</div>
|
26
|
+
<div>bar </div>
|
27
|
+
</div>
|
28
|
+
|
29
|
+
para5
|
30
|
+
|
31
|
+
<div>id</div>
|
32
|
+
|
33
|
+
<div>id
|
34
|
+
</div> test
|
35
|
+
|
36
|
+
<div>hallo</p><div>test</div>
|
37
|
+
hallo
|
38
|
+
</div>
|
39
|
+
|
40
|
+
<div>hallo<div>test</div>
|
41
|
+
hallo
|
42
|
+
</div></p>
|
43
|
+
|
44
|
+
<div>
|
45
|
+
hallo
|
46
|
+
</div> <div>
|
47
|
+
hallo
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<webgen:block name="test" />
|
51
|
+
|
52
|
+
<some:url name:spac='hallo'>doit</some:url>
|
53
|
+
|
54
|
+
<em>Test</em>
|
55
|
+
|
56
|
+
<p><em>Test</em></p>
|
@@ -0,0 +1,17 @@
|
|
1
|
+
<p class="other-class myclass class" id="other" key1="val"" key2="val'" key="val">Some paragraph.</p>
|
2
|
+
|
3
|
+
<blockquote class="class" id="id">
|
4
|
+
<p>quote</p>
|
5
|
+
</blockquote>
|
6
|
+
|
7
|
+
<ul key="val">
|
8
|
+
<li>list</li>
|
9
|
+
</ul>
|
10
|
+
|
11
|
+
<pre id="other"><code>code block
|
12
|
+
</code></pre>
|
13
|
+
|
14
|
+
<h2 id="myid">A header</h2>
|
15
|
+
|
16
|
+
<h1 class="class" id="other">Another header</h1>
|
17
|
+
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Some paragraph.
|
2
|
+
{:.class id key="val"}
|
3
|
+
|
4
|
+
> quote
|
5
|
+
{: #id}
|
6
|
+
{: .class}
|
7
|
+
|
8
|
+
* list
|
9
|
+
{: key="val"}
|
10
|
+
|
11
|
+
code block
|
12
|
+
{: #other}
|
13
|
+
|
14
|
+
## A header
|
15
|
+
{:#myid}
|
16
|
+
|
17
|
+
Another header
|
18
|
+
==============
|
19
|
+
{: .class #other}
|
20
|
+
|
21
|
+
{:id: #id key="valo"}
|
22
|
+
{:id: #other .myclass other}
|
23
|
+
{:other: key1="val\"" - ig.nored as_is#this key2='val\'' .other-class}
|
24
|
+
|
25
|
+
{:.invalid}
|
@@ -0,0 +1,15 @@
|
|
1
|
+
<h1>No header id</h1>
|
2
|
+
|
3
|
+
<h1 id="with-header-id">with header id</h1>
|
4
|
+
|
5
|
+
This is some text.
|
6
|
+
|
7
|
+
<p>Some text<sup id="fnref:ab"><a href="#fn:ab" rel="footnote">10</a></sup>.</p>
|
8
|
+
|
9
|
+
<div class="kramdown-footnotes">
|
10
|
+
<ol start="10">
|
11
|
+
<li id="fn:ab">
|
12
|
+
<p>Some text.<a href="#fnref:ab" rev="footnote">↩</a></p>
|
13
|
+
</li>
|
14
|
+
</ol>
|
15
|
+
</div>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# No header id
|
2
|
+
|
3
|
+
{::kdoptions:: unusedvar="val"}
|
4
|
+
{::kdoptions:: auto_ids="true"}
|
5
|
+
|
6
|
+
# with header id
|
7
|
+
|
8
|
+
{::kdoptions:: auto_ids="false" filter_html="p em"}
|
9
|
+
|
10
|
+
<p>
|
11
|
+
This is <em>some</em> text.
|
12
|
+
</p>
|
13
|
+
|
14
|
+
{::kdoptions:: footnote_nr="10"}
|
15
|
+
|
16
|
+
Some text[^ab].
|
17
|
+
|
18
|
+
[^ab]: Some text.
|