kramdown 0.3.0 → 0.4.0
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.
Potentially problematic release.
This version of kramdown might be problematic. Click here for more details.
- data/ChangeLog +243 -0
- data/Rakefile +0 -17
- data/VERSION +1 -1
- data/benchmark/historic-jruby-1.4.0.dat +7 -7
- data/benchmark/historic-ruby-1.8.6.dat +7 -7
- data/benchmark/historic-ruby-1.8.7.dat +7 -7
- data/benchmark/historic-ruby-1.9.1p243.dat +7 -7
- data/benchmark/historic-ruby-1.9.2dev.dat +7 -7
- data/benchmark/testing.sh +1 -1
- data/doc/index.page +4 -3
- data/doc/quickref.page +31 -1
- data/doc/syntax.page +166 -12
- data/lib/kramdown/converter.rb +107 -56
- data/lib/kramdown/document.rb +16 -1
- data/lib/kramdown/extension.rb +19 -0
- data/lib/kramdown/parser/kramdown.rb +2 -1
- data/lib/kramdown/parser/kramdown/attribute_list.rb +2 -2
- data/lib/kramdown/parser/kramdown/codeblock.rb +5 -9
- data/lib/kramdown/parser/kramdown/escaped_chars.rb +1 -1
- data/lib/kramdown/parser/kramdown/footnote.rb +2 -1
- data/lib/kramdown/parser/kramdown/table.rb +125 -0
- data/lib/kramdown/version.rb +1 -1
- data/test/testcases/block/06_codeblock/with_blank_line.text +1 -0
- data/test/testcases/block/09_html/parse_as_span.html +3 -0
- data/test/testcases/block/09_html/parse_as_span.text +2 -0
- data/test/testcases/block/11_ial/simple.html +3 -0
- data/test/testcases/block/11_ial/simple.text +4 -2
- data/test/testcases/block/12_extension/options.html +1 -1
- data/test/testcases/block/12_extension/options2.html +1 -1
- data/test/testcases/block/12_extension/options3.html +7 -0
- data/test/testcases/block/12_extension/options3.text +7 -0
- data/test/testcases/block/13_definition_list/no_def_list.html +2 -0
- data/test/testcases/block/13_definition_list/no_def_list.text +2 -0
- data/test/testcases/block/14_table/errors.html +3 -0
- data/test/testcases/block/14_table/errors.text +3 -0
- data/test/testcases/block/14_table/footer.html +65 -0
- data/test/testcases/block/14_table/footer.text +25 -0
- data/test/testcases/block/14_table/header.html +103 -0
- data/test/testcases/block/14_table/header.text +32 -0
- data/test/testcases/block/14_table/no_table.html +3 -0
- data/test/testcases/block/14_table/no_table.text +3 -0
- data/test/testcases/block/14_table/simple.html +61 -0
- data/test/testcases/block/14_table/simple.text +16 -0
- data/test/testcases/span/04_footnote/footnote_nr.html +1 -1
- data/test/testcases/span/04_footnote/markers.html +1 -1
- data/test/testcases/span/escaped_chars/normal.html +4 -0
- data/test/testcases/span/escaped_chars/normal.text +4 -0
- metadata +17 -2
data/lib/kramdown/version.rb
CHANGED
@@ -15,7 +15,7 @@ This is some text.
|
|
15
15
|
|
16
16
|
<p>Some text<sup id="fnref:ab"><a href="#fn:ab" rel="footnote">10</a></sup>.</p>
|
17
17
|
|
18
|
-
<div class="
|
18
|
+
<div class="footnotes">
|
19
19
|
<ol start="10">
|
20
20
|
<li id="fn:ab">
|
21
21
|
<p>Some text.<a href="#fnref:ab" rev="footnote">↩</a></p>
|
@@ -0,0 +1,65 @@
|
|
1
|
+
<p>Simple footer</p>
|
2
|
+
|
3
|
+
<table>
|
4
|
+
<tbody>
|
5
|
+
<tr>
|
6
|
+
<td>cell1</td>
|
7
|
+
<td>cell2</td>
|
8
|
+
</tr>
|
9
|
+
</tbody>
|
10
|
+
<tfoot>
|
11
|
+
<tr>
|
12
|
+
<td>cell3</td>
|
13
|
+
<td>cell4</td>
|
14
|
+
</tr>
|
15
|
+
</tfoot>
|
16
|
+
</table>
|
17
|
+
|
18
|
+
<p>Full footer</p>
|
19
|
+
|
20
|
+
<table>
|
21
|
+
<tbody>
|
22
|
+
<tr>
|
23
|
+
<td>cell1</td>
|
24
|
+
<td>cell2</td>
|
25
|
+
</tr>
|
26
|
+
</tbody>
|
27
|
+
<tfoot>
|
28
|
+
<tr>
|
29
|
+
<td>cell3</td>
|
30
|
+
<td>cell4</td>
|
31
|
+
</tr>
|
32
|
+
</tfoot>
|
33
|
+
</table>
|
34
|
+
|
35
|
+
<p>Footer with separator lines</p>
|
36
|
+
|
37
|
+
<table>
|
38
|
+
<tbody>
|
39
|
+
<tr>
|
40
|
+
<td>cell1</td>
|
41
|
+
<td>cell2</td>
|
42
|
+
</tr>
|
43
|
+
</tbody>
|
44
|
+
<tfoot>
|
45
|
+
<tr>
|
46
|
+
<td>cell3</td>
|
47
|
+
<td>cell4</td>
|
48
|
+
</tr>
|
49
|
+
<tr>
|
50
|
+
<td>cell5</td>
|
51
|
+
<td>cell6</td>
|
52
|
+
</tr>
|
53
|
+
</tfoot>
|
54
|
+
</table>
|
55
|
+
|
56
|
+
<p>Empty footer</p>
|
57
|
+
|
58
|
+
<table>
|
59
|
+
<tbody>
|
60
|
+
<tr>
|
61
|
+
<td>cell1</td>
|
62
|
+
<td>cell2</td>
|
63
|
+
</tr>
|
64
|
+
</tbody>
|
65
|
+
</table>
|
@@ -0,0 +1,25 @@
|
|
1
|
+
Simple footer
|
2
|
+
|
3
|
+
| cell1 | cell2
|
4
|
+
|=
|
5
|
+
| cell3 | cell4
|
6
|
+
|
7
|
+
Full footer
|
8
|
+
|
9
|
+
| cell1 | cell2
|
10
|
+
|=======|=======|
|
11
|
+
| cell3 | cell4
|
12
|
+
|
13
|
+
Footer with separator lines
|
14
|
+
|
15
|
+
| cell1 | cell2
|
16
|
+
|=======|=======|
|
17
|
+
| cell3 | cell4
|
18
|
+
|---
|
19
|
+
| cell5 | cell6
|
20
|
+
|---
|
21
|
+
|
22
|
+
Empty footer
|
23
|
+
|
24
|
+
| cell1 | cell2
|
25
|
+
|=
|
@@ -0,0 +1,103 @@
|
|
1
|
+
<p>Simple header</p>
|
2
|
+
|
3
|
+
<table>
|
4
|
+
<thead>
|
5
|
+
<tr>
|
6
|
+
<th>cell1</th>
|
7
|
+
<th>cell2</th>
|
8
|
+
</tr>
|
9
|
+
</thead>
|
10
|
+
<tbody>
|
11
|
+
<tr>
|
12
|
+
<td>cell3</td>
|
13
|
+
<td>cell4</td>
|
14
|
+
</tr>
|
15
|
+
</tbody>
|
16
|
+
</table>
|
17
|
+
|
18
|
+
<p>Full header</p>
|
19
|
+
|
20
|
+
<table>
|
21
|
+
<thead>
|
22
|
+
<tr>
|
23
|
+
<th>cell1</th>
|
24
|
+
<th>cell2</th>
|
25
|
+
</tr>
|
26
|
+
</thead>
|
27
|
+
<tbody>
|
28
|
+
<tr>
|
29
|
+
<td>cell3</td>
|
30
|
+
<td>cell4</td>
|
31
|
+
</tr>
|
32
|
+
</tbody>
|
33
|
+
</table>
|
34
|
+
|
35
|
+
<p>With alignment and superfluous alignment defs</p>
|
36
|
+
|
37
|
+
<table>
|
38
|
+
<col />
|
39
|
+
<col align="left" />
|
40
|
+
<col align="center" />
|
41
|
+
<col align="right" />
|
42
|
+
<col />
|
43
|
+
<thead>
|
44
|
+
<tr>
|
45
|
+
<th>default</th>
|
46
|
+
<th>left</th>
|
47
|
+
<th>center</th>
|
48
|
+
<th>right</th>
|
49
|
+
<th>default</th>
|
50
|
+
</tr>
|
51
|
+
</thead>
|
52
|
+
<tbody>
|
53
|
+
<tr>
|
54
|
+
<td>cell1</td>
|
55
|
+
<td>cell2</td>
|
56
|
+
<td>cell3</td>
|
57
|
+
<td>cell4</td>
|
58
|
+
<td>cell5</td>
|
59
|
+
</tr>
|
60
|
+
</tbody>
|
61
|
+
</table>
|
62
|
+
|
63
|
+
<p>With leading sep line</p>
|
64
|
+
|
65
|
+
<table>
|
66
|
+
<thead>
|
67
|
+
<tr>
|
68
|
+
<th>cell1</th>
|
69
|
+
<th>cell2</th>
|
70
|
+
</tr>
|
71
|
+
</thead>
|
72
|
+
<tbody>
|
73
|
+
<tr>
|
74
|
+
<td>cell3</td>
|
75
|
+
<td>cell4</td>
|
76
|
+
</tr>
|
77
|
+
</tbody>
|
78
|
+
</table>
|
79
|
+
|
80
|
+
<p>Multiple bodies</p>
|
81
|
+
|
82
|
+
<table>
|
83
|
+
<col align="center" />
|
84
|
+
<col />
|
85
|
+
<thead>
|
86
|
+
<tr>
|
87
|
+
<th>cell1</th>
|
88
|
+
<th>cell2</th>
|
89
|
+
</tr>
|
90
|
+
</thead>
|
91
|
+
<tbody>
|
92
|
+
<tr>
|
93
|
+
<td>cell3</td>
|
94
|
+
<td>cell4</td>
|
95
|
+
</tr>
|
96
|
+
</tbody>
|
97
|
+
<tbody>
|
98
|
+
<tr>
|
99
|
+
<td>cell5</td>
|
100
|
+
<td>cell6</td>
|
101
|
+
</tr>
|
102
|
+
</tbody>
|
103
|
+
</table>
|
@@ -0,0 +1,32 @@
|
|
1
|
+
Simple header
|
2
|
+
|
3
|
+
| cell1 | cell2
|
4
|
+
|-----
|
5
|
+
| cell3 | cell4
|
6
|
+
|
7
|
+
Full header
|
8
|
+
|
9
|
+
| cell1 | cell2
|
10
|
+
|-------|-------|
|
11
|
+
| cell3 | cell4
|
12
|
+
|
13
|
+
With alignment and superfluous alignment defs
|
14
|
+
|
15
|
+
| default | left | center | right | default
|
16
|
+
|-| :- |:-: | -: | - | :-: | :-
|
17
|
+
| cell1 | cell2 | cell3 | cell4 | cell5
|
18
|
+
|
19
|
+
With leading sep line
|
20
|
+
|
21
|
+
|:-:|-:|
|
22
|
+
| cell1 | cell2
|
23
|
+
|-------|-------|
|
24
|
+
| cell3 | cell4
|
25
|
+
|
26
|
+
Multiple bodies
|
27
|
+
|
28
|
+
| cell1 | cell2
|
29
|
+
+ :-:
|
30
|
+
| cell3 | cell4
|
31
|
+
|----|||
|
32
|
+
| cell5 | cell6
|
@@ -0,0 +1,61 @@
|
|
1
|
+
<table>
|
2
|
+
<tbody>
|
3
|
+
<tr>
|
4
|
+
<td>cell1</td>
|
5
|
+
<td>cell2</td>
|
6
|
+
</tr>
|
7
|
+
<tr>
|
8
|
+
<td>cell3</td>
|
9
|
+
<td>cell4</td>
|
10
|
+
</tr>
|
11
|
+
<tr>
|
12
|
+
<td>cell5</td>
|
13
|
+
<td>cell6 |</td>
|
14
|
+
</tr>
|
15
|
+
<tr>
|
16
|
+
<td>cell7</td>
|
17
|
+
<td>cell8</td>
|
18
|
+
</tr>
|
19
|
+
</tbody>
|
20
|
+
</table>
|
21
|
+
|
22
|
+
<p>Missing cells at end</p>
|
23
|
+
|
24
|
+
<table>
|
25
|
+
<tbody>
|
26
|
+
<tr>
|
27
|
+
<td>cell1</td>
|
28
|
+
<td>cell2</td>
|
29
|
+
<td>cell3</td>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<td>cell1</td>
|
33
|
+
<td> </td>
|
34
|
+
<td> </td>
|
35
|
+
</tr>
|
36
|
+
<tr>
|
37
|
+
<td> </td>
|
38
|
+
<td>cell2</td>
|
39
|
+
<td>cell3</td>
|
40
|
+
</tr>
|
41
|
+
</tbody>
|
42
|
+
</table>
|
43
|
+
|
44
|
+
<p>Escaped pipe characters</p>
|
45
|
+
|
46
|
+
<table>
|
47
|
+
<tbody>
|
48
|
+
<tr>
|
49
|
+
<td>cell1 | cell1</td>
|
50
|
+
<td>cell2</td>
|
51
|
+
</tr>
|
52
|
+
<tr>
|
53
|
+
<td>cell1</td>
|
54
|
+
<td>cell2 |</td>
|
55
|
+
</tr>
|
56
|
+
<tr>
|
57
|
+
<td>cell1 <code>|</code> con</td>
|
58
|
+
<td>cell2</td>
|
59
|
+
</tr>
|
60
|
+
</tbody>
|
61
|
+
</table>
|
@@ -0,0 +1,16 @@
|
|
1
|
+
| cell1 | cell2 |
|
2
|
+
|cell3 | cell4|
|
3
|
+
|cell5|cell6 \|
|
4
|
+
| cell7|cell8
|
5
|
+
|
6
|
+
Missing cells at end
|
7
|
+
|
8
|
+
| cell1 | cell2 | cell3 |
|
9
|
+
| cell1 ||
|
10
|
+
|| cell2 | cell3
|
11
|
+
|
12
|
+
Escaped pipe characters
|
13
|
+
|
14
|
+
| cell1 \| cell1 | cell2 |
|
15
|
+
| cell1 | cell2 \|
|
16
|
+
| cell1 `\|` con | cell2
|
@@ -1,6 +1,6 @@
|
|
1
1
|
<p>This is a footnote<sup id="fnref:ab"><a href="#fn:ab" rel="footnote">35</a></sup>. And another<sup id="fnref:bc"><a href="#fn:bc" rel="footnote">36</a></sup>.</p>
|
2
2
|
|
3
|
-
<div class="
|
3
|
+
<div class="footnotes">
|
4
4
|
<ol start="35">
|
5
5
|
<li id="fn:ab">
|
6
6
|
<p>Some text.<a href="#fnref:ab" rev="footnote">↩</a></p>
|