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,66 @@
|
|
1
|
+
With tabs/spaces, no paras:
|
2
|
+
|
3
|
+
* item1
|
4
|
+
+ item2
|
5
|
+
- item3
|
6
|
+
|
7
|
+
With tabs/spaces, paras:
|
8
|
+
|
9
|
+
- item1
|
10
|
+
|
11
|
+
* item2
|
12
|
+
|
13
|
+
+ item3
|
14
|
+
|
15
|
+
With tabs/spaces, no paras:
|
16
|
+
|
17
|
+
1. item1
|
18
|
+
20. item2
|
19
|
+
3. item3
|
20
|
+
|
21
|
+
With tabs/spaces, paras:
|
22
|
+
|
23
|
+
1. item1
|
24
|
+
|
25
|
+
2. item2
|
26
|
+
|
27
|
+
3. item3
|
28
|
+
|
29
|
+
Nested, without paras:
|
30
|
+
|
31
|
+
* item1
|
32
|
+
* item2
|
33
|
+
* item3
|
34
|
+
|
35
|
+
Nested, with paras:
|
36
|
+
|
37
|
+
+ item1
|
38
|
+
|
39
|
+
* item2
|
40
|
+
* item3 (level 3)
|
41
|
+
|
42
|
+
Ordered, without paras:
|
43
|
+
|
44
|
+
1. item1
|
45
|
+
2. item2
|
46
|
+
* do
|
47
|
+
* it
|
48
|
+
* now
|
49
|
+
3. item3
|
50
|
+
|
51
|
+
Ordered, with paras:
|
52
|
+
|
53
|
+
1. item1
|
54
|
+
|
55
|
+
2. item2
|
56
|
+
|
57
|
+
* do
|
58
|
+
* it
|
59
|
+
* now
|
60
|
+
|
61
|
+
3. item3
|
62
|
+
|
63
|
+
Mixed tabs and spaces:
|
64
|
+
|
65
|
+
* some text
|
66
|
+
* nested
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<ul>
|
2
|
+
<li>
|
3
|
+
<pre><code>This is a code block.
|
4
|
+
</code></pre>
|
5
|
+
</li>
|
6
|
+
<li>
|
7
|
+
<blockquote>
|
8
|
+
<p>This is a blockquote.</p>
|
9
|
+
</blockquote>
|
10
|
+
</li>
|
11
|
+
<li>
|
12
|
+
<h2>A header</h2>
|
13
|
+
</li>
|
14
|
+
</ul>
|
15
|
+
<ul>
|
16
|
+
<li>
|
17
|
+
<pre><code>This is a code block.
|
18
|
+
</code></pre>
|
19
|
+
</li>
|
20
|
+
<li>
|
21
|
+
<blockquote>
|
22
|
+
<p>This is a blockquote.</p>
|
23
|
+
</blockquote>
|
24
|
+
<p>Followed by some para.</p>
|
25
|
+
</li>
|
26
|
+
<li>
|
27
|
+
<h1>A header</h1>
|
28
|
+
<p>a para</p>
|
29
|
+
</li>
|
30
|
+
</ul>
|
31
|
+
<ul>
|
32
|
+
<li>
|
33
|
+
<ul>
|
34
|
+
<li>nested list</li>
|
35
|
+
<li>other nested item</li>
|
36
|
+
</ul>
|
37
|
+
</li>
|
38
|
+
<li>item 2</li>
|
39
|
+
</ul>
|
@@ -0,0 +1,18 @@
|
|
1
|
+
*
|
2
|
+
This is a code block.
|
3
|
+
* > This is a blockquote.
|
4
|
+
* ## A header
|
5
|
+
^
|
6
|
+
*
|
7
|
+
This is a code block.
|
8
|
+
|
9
|
+
* > This is a blockquote.
|
10
|
+
Followed by some para.
|
11
|
+
|
12
|
+
* A header
|
13
|
+
=========
|
14
|
+
a para
|
15
|
+
^
|
16
|
+
* * nested list
|
17
|
+
* other nested item
|
18
|
+
* item 2
|
@@ -0,0 +1,19 @@
|
|
1
|
+
<ol>
|
2
|
+
<li>This is a simple list item</li>
|
3
|
+
<li>
|
4
|
+
<p>Followed by another</p>
|
5
|
+
</li>
|
6
|
+
<li>
|
7
|
+
<p>Followed by</p>
|
8
|
+
|
9
|
+
<p>a para list item</p>
|
10
|
+
</li>
|
11
|
+
<li>and a normal one</li>
|
12
|
+
<li>
|
13
|
+
<p>and</p>
|
14
|
+
|
15
|
+
<p>a para</p>
|
16
|
+
</li>
|
17
|
+
</ol>
|
18
|
+
|
19
|
+
<p>para</p>
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<ul>
|
2
|
+
<li>This is a simple list item</li>
|
3
|
+
<li>
|
4
|
+
<p>Followed by another</p>
|
5
|
+
</li>
|
6
|
+
<li>
|
7
|
+
<p>Followed by</p>
|
8
|
+
|
9
|
+
<p>a para list item</p>
|
10
|
+
</li>
|
11
|
+
<li>and a normal one</li>
|
12
|
+
<li>
|
13
|
+
<p>and</p>
|
14
|
+
|
15
|
+
<p>a para</p>
|
16
|
+
</li>
|
17
|
+
</ul>
|
18
|
+
|
19
|
+
<p>para</p>
|
20
|
+
|
21
|
+
<ul>
|
22
|
+
<li>multi line
|
23
|
+
list item</li>
|
24
|
+
</ul>
|
25
|
+
|
26
|
+
<p>para</p>
|
27
|
+
|
28
|
+
<ul>
|
29
|
+
<li>list item line1
|
30
|
+
one line
|
31
|
+
two lines</li>
|
32
|
+
<li>list item line2
|
33
|
+
one line
|
34
|
+
two lines</li>
|
35
|
+
</ul>
|
36
|
+
|
37
|
+
<p>para</p>
|
38
|
+
|
39
|
+
<ul>
|
40
|
+
<li>list item line3
|
41
|
+
one line
|
42
|
+
two lines</li>
|
43
|
+
<li>list item line4
|
44
|
+
one line
|
45
|
+
two lines</li>
|
46
|
+
</ul>
|
47
|
+
|
48
|
+
<p>para</p>
|
49
|
+
|
50
|
+
<ul>
|
51
|
+
<li>
|
52
|
+
<p>first para</p>
|
53
|
+
|
54
|
+
<p>other para</p>
|
55
|
+
</li>
|
56
|
+
</ul>
|
57
|
+
<p>not in list para</p>
|
58
|
+
|
59
|
+
<ul>
|
60
|
+
<li>second para</li>
|
61
|
+
</ul>
|
@@ -0,0 +1,43 @@
|
|
1
|
+
* This is a simple list item
|
2
|
+
* Followed by another
|
3
|
+
|
4
|
+
|
5
|
+
* Followed by
|
6
|
+
|
7
|
+
a para list item
|
8
|
+
* and a normal one
|
9
|
+
* and
|
10
|
+
|
11
|
+
a para
|
12
|
+
|
13
|
+
para
|
14
|
+
|
15
|
+
* multi line
|
16
|
+
list item
|
17
|
+
|
18
|
+
para
|
19
|
+
|
20
|
+
* list item line1
|
21
|
+
one line
|
22
|
+
two lines
|
23
|
+
* list item line2
|
24
|
+
one line
|
25
|
+
two lines
|
26
|
+
|
27
|
+
para
|
28
|
+
|
29
|
+
* list item line3
|
30
|
+
one line
|
31
|
+
two lines
|
32
|
+
* list item line4
|
33
|
+
one line
|
34
|
+
two lines
|
35
|
+
|
36
|
+
para
|
37
|
+
|
38
|
+
* first para
|
39
|
+
|
40
|
+
other para
|
41
|
+
not in list para
|
42
|
+
|
43
|
+
* second para
|
@@ -0,0 +1 @@
|
|
1
|
+
* single
|
@@ -0,0 +1,29 @@
|
|
1
|
+
<ul>
|
2
|
+
<li>not a para
|
3
|
+
here
|
4
|
+
<blockquote>
|
5
|
+
<p>blockquote</p>
|
6
|
+
</blockquote>
|
7
|
+
</li>
|
8
|
+
<li>and not
|
9
|
+
here
|
10
|
+
<blockquote>
|
11
|
+
<p>blockquote</p>
|
12
|
+
</blockquote>
|
13
|
+
</li>
|
14
|
+
<li>
|
15
|
+
<p>this is a para</p>
|
16
|
+
</li>
|
17
|
+
<li>
|
18
|
+
<blockquote>
|
19
|
+
<p>blockquote</p>
|
20
|
+
</blockquote>
|
21
|
+
</li>
|
22
|
+
<li>
|
23
|
+
<p>this too</p>
|
24
|
+
</li>
|
25
|
+
</ul>
|
26
|
+
|
27
|
+
<p>A paragraph
|
28
|
+
1. followed not by ol
|
29
|
+
- followed not by ul</p>
|
@@ -0,0 +1 @@
|
|
1
|
+
:auto_parse_block_html: true
|
@@ -0,0 +1 @@
|
|
1
|
+
filtered.
|
@@ -0,0 +1 @@
|
|
1
|
+
:filter_html: [p]
|
@@ -0,0 +1 @@
|
|
1
|
+
<p>filtered.</p>
|