kramdown 0.10.0 → 0.11.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/CONTRIBUTERS +1 -1
- data/ChangeLog +594 -0
- data/Rakefile +2 -2
- data/VERSION +1 -1
- data/data/kramdown/document.html +11 -2
- data/doc/default.template +2 -2
- data/doc/index.page +1 -2
- data/doc/quickref.page +2 -2
- data/doc/syntax.page +270 -179
- data/lib/kramdown/converter/html.rb +43 -29
- data/lib/kramdown/converter/kramdown.rb +97 -73
- data/lib/kramdown/converter/latex.rb +18 -13
- data/lib/kramdown/document.rb +8 -6
- data/lib/kramdown/options.rb +7 -10
- data/lib/kramdown/parser/html.rb +29 -21
- data/lib/kramdown/parser/kramdown.rb +19 -3
- data/lib/kramdown/parser/kramdown/abbreviation.rb +1 -0
- data/lib/kramdown/parser/kramdown/attribute_list.rb +18 -12
- data/lib/kramdown/parser/kramdown/autolink.rb +1 -1
- data/lib/kramdown/parser/kramdown/block_boundary.rb +46 -0
- data/lib/kramdown/parser/kramdown/blockquote.rb +7 -3
- data/lib/kramdown/parser/kramdown/codeblock.rb +5 -3
- data/lib/kramdown/parser/kramdown/escaped_chars.rb +1 -1
- data/lib/kramdown/parser/kramdown/extension.rb +22 -8
- data/lib/kramdown/parser/kramdown/footnote.rb +3 -2
- data/lib/kramdown/parser/kramdown/header.rb +10 -10
- data/lib/kramdown/parser/kramdown/html.rb +16 -14
- data/lib/kramdown/parser/kramdown/html_entity.rb +1 -1
- data/lib/kramdown/parser/kramdown/link.rb +8 -8
- data/lib/kramdown/parser/kramdown/list.rb +36 -29
- data/lib/kramdown/parser/kramdown/math.rb +15 -4
- data/lib/kramdown/parser/kramdown/paragraph.rb +14 -3
- data/lib/kramdown/parser/kramdown/table.rb +17 -9
- data/lib/kramdown/utils.rb +1 -0
- data/lib/kramdown/utils/html.rb +9 -9
- data/lib/kramdown/utils/ordered_hash.rb +79 -0
- data/lib/kramdown/version.rb +1 -1
- data/man/man1/kramdown.1 +9 -12
- data/test/test_files.rb +6 -1
- data/test/testcases/block/02_eob/middle.html +0 -1
- data/test/testcases/block/04_header/atx_header.html +5 -2
- data/test/testcases/block/04_header/atx_header.text +3 -1
- data/test/testcases/block/04_header/setext_header.html +4 -5
- data/test/testcases/block/04_header/setext_header.html.19 +30 -0
- data/test/testcases/block/05_blockquote/lazy.html +34 -0
- data/test/testcases/block/05_blockquote/lazy.text +20 -0
- data/test/testcases/block/05_blockquote/nested.html +1 -0
- data/test/testcases/block/05_blockquote/nested.text +1 -0
- data/test/testcases/block/05_blockquote/with_code_blocks.html +2 -2
- data/test/testcases/block/06_codeblock/lazy.html +4 -0
- data/test/testcases/block/06_codeblock/lazy.text +5 -0
- data/test/testcases/block/06_codeblock/no_newline_at_end_1.html +2 -0
- data/test/testcases/block/06_codeblock/no_newline_at_end_1.text +2 -0
- data/test/testcases/block/06_codeblock/with_ial.html +6 -0
- data/test/testcases/block/06_codeblock/with_ial.text +5 -0
- data/test/testcases/block/07_horizontal_rule/normal.html +0 -2
- data/test/testcases/block/07_horizontal_rule/normal.text +0 -2
- data/test/testcases/block/08_list/item_ial.html +1 -3
- data/test/testcases/block/08_list/lazy.html +39 -0
- data/test/testcases/block/08_list/lazy.text +29 -0
- data/test/testcases/block/08_list/list_and_others.html +5 -3
- data/test/testcases/block/08_list/list_and_others.text +1 -0
- data/test/testcases/block/08_list/other_first_element.html +2 -2
- data/test/testcases/block/08_list/other_first_element.text +1 -1
- data/test/testcases/block/08_list/simple_ul.html +0 -13
- data/test/testcases/block/08_list/simple_ul.text +0 -7
- data/test/testcases/block/08_list/special_cases.html +8 -31
- data/test/testcases/block/08_list/special_cases.text +2 -15
- data/test/testcases/block/09_html/comment.html +2 -2
- data/test/testcases/block/09_html/html_to_native/emphasis.html +2 -0
- data/test/testcases/block/09_html/html_to_native/emphasis.text +2 -0
- data/test/testcases/block/09_html/html_to_native/table_normal.html +2 -1
- data/test/testcases/block/09_html/html_to_native/table_simple.html +4 -2
- data/test/testcases/block/09_html/invalid_html_1.html +2 -0
- data/test/testcases/block/09_html/parse_as_raw.html +2 -2
- data/test/testcases/block/09_html/parse_as_span.html +1 -1
- data/test/testcases/block/09_html/simple.html +2 -0
- data/test/testcases/block/09_html/simple.html.19 +2 -0
- data/test/testcases/block/09_html/simple.text +2 -0
- data/test/testcases/block/11_ial/auto_id_and_ial.html +1 -1
- data/test/testcases/block/11_ial/simple.html +2 -3
- data/test/testcases/block/12_extension/comment.html +3 -1
- data/test/testcases/block/12_extension/comment.text +2 -1
- data/test/testcases/block/12_extension/ignored.html +5 -1
- data/test/testcases/block/12_extension/ignored.text +1 -1
- data/test/testcases/block/12_extension/nomarkdown.html +5 -1
- data/test/testcases/block/12_extension/nomarkdown.kramdown +20 -0
- data/test/testcases/block/12_extension/nomarkdown.latex +13 -0
- data/test/testcases/block/12_extension/nomarkdown.text +11 -1
- data/test/testcases/block/13_definition_list/item_ial.html +1 -3
- data/test/testcases/block/13_definition_list/item_ial.text +1 -1
- data/test/testcases/block/13_definition_list/simple.html +2 -2
- data/test/testcases/block/14_table/errors.html +5 -0
- data/test/testcases/block/14_table/errors.text +6 -0
- data/test/testcases/block/14_table/header.text +1 -1
- data/test/testcases/block/14_table/no_table.text +1 -1
- data/test/testcases/block/14_table/simple.html +78 -0
- data/test/testcases/block/14_table/simple.text +22 -0
- data/test/testcases/block/15_math/normal.html +11 -4
- data/test/testcases/block/15_math/normal.text +10 -0
- data/test/testcases/encoding.html +1 -1
- data/test/testcases/span/01_link/image_in_a.html +3 -3
- data/test/testcases/span/01_link/imagelinks.html +7 -7
- data/test/testcases/span/01_link/inline.html +11 -5
- data/test/testcases/span/01_link/inline.html.19 +11 -5
- data/test/testcases/span/01_link/inline.text +11 -5
- data/test/testcases/span/01_link/link_defs.html +2 -1
- data/test/testcases/span/01_link/link_defs.text +4 -0
- data/test/testcases/span/01_link/reference.html +3 -0
- data/test/testcases/span/01_link/reference.html.19 +3 -0
- data/test/testcases/span/01_link/reference.text +5 -0
- data/test/testcases/span/03_codespan/highlighting.html +1 -0
- data/test/testcases/span/03_codespan/highlighting.text +1 -0
- data/test/testcases/span/04_footnote/definitions.html +3 -0
- data/test/testcases/span/04_footnote/definitions.latex +3 -4
- data/test/testcases/span/04_footnote/definitions.text +6 -0
- data/test/testcases/span/04_footnote/footnote_nr.latex +1 -5
- data/test/testcases/span/04_footnote/markers.latex +5 -14
- data/test/testcases/span/05_html/markdown_attr.html +1 -1
- data/test/testcases/span/05_html/markdown_attr.text +1 -1
- data/test/testcases/span/05_html/normal.html +5 -3
- data/test/testcases/span/05_html/normal.text +2 -0
- data/test/testcases/span/escaped_chars/normal.html +2 -0
- data/test/testcases/span/escaped_chars/normal.text +2 -0
- data/test/testcases/span/extension/comment.html +2 -2
- data/test/testcases/span/extension/ignored.html +1 -1
- data/test/testcases/span/text_substitutions/typography.html +1 -1
- data/test/testcases/span/text_substitutions/typography.html.19 +1 -1
- data/test/testcases/span/text_substitutions/typography.text +1 -1
- metadata +20 -5
- data/test/testcases/block/05_blockquote/only_first_quoted.html +0 -8
- data/test/testcases/block/05_blockquote/only_first_quoted.text +0 -4
@@ -23,15 +23,21 @@
|
|
23
23
|
<p>simple <a href="something.html" title="title">URL broken
|
24
24
|
on line</a></p>
|
25
25
|
|
26
|
-
<p>
|
26
|
+
<p>simple <a href="with spaces.html">URL with spaces</a></p>
|
27
27
|
|
28
|
-
<p>
|
28
|
+
<p>simple <a href="with spaces.html" title="title">URL with spaces</a></p>
|
29
|
+
|
30
|
+
<p>simple <a href="with (spaces).html">URL with spaces</a></p>
|
31
|
+
|
32
|
+
<p>simple <a href="spaces.html">leading/trailing spaces</a></p>
|
29
33
|
|
30
|
-
<p>
|
34
|
+
<p>simple <a href="spaces.html">leading/trailing spaces</a></p>
|
31
35
|
|
32
|
-
<p>
|
36
|
+
<p>simple <a href="spaces.html">leading/trailing spaces</a></p>
|
33
37
|
|
34
|
-
<p>bad [URL
|
38
|
+
<p>bad [URL <a href="something.html">not</a></p>
|
39
|
+
|
40
|
+
<p>bad [URL with parens](something(new.html)</p>
|
35
41
|
|
36
42
|
<p>bad [URL with empty title](something.html ‘’)</p>
|
37
43
|
|
@@ -24,16 +24,22 @@ simple [URL broken
|
|
24
24
|
on line](something.html
|
25
25
|
"title")
|
26
26
|
|
27
|
+
simple [URL with spaces](with spaces.html)
|
27
28
|
|
28
|
-
|
29
|
+
simple [URL with spaces](with spaces.html 'title')
|
29
30
|
|
30
|
-
|
31
|
+
simple [URL with spaces](with (spaces).html)
|
32
|
+
|
33
|
+
simple [leading/trailing spaces]( spaces.html)
|
34
|
+
|
35
|
+
simple [leading/trailing spaces](spaces.html )
|
31
36
|
|
32
|
-
|
37
|
+
simple [leading/trailing spaces]( spaces.html )
|
33
38
|
|
34
|
-
bad [URL with trailing spaces](something.html )
|
35
39
|
|
36
|
-
bad [URL
|
40
|
+
bad [URL [not](something.html)
|
41
|
+
|
42
|
+
bad [URL with parens](something(new.html)
|
37
43
|
|
38
44
|
bad [URL with empty title](something.html '')
|
39
45
|
|
@@ -5,6 +5,10 @@ This is a para.
|
|
5
5
|
[otherid2]: http://wwww.example.com/ 'title 2'
|
6
6
|
[otherid3]: <some spaces.html>
|
7
7
|
[otherid4]: <some spaces.html> 'title'
|
8
|
+
[otherid5]: some spaces.html
|
9
|
+
[otherid6]: some spaces.html 'title'
|
10
|
+
[otherid7]: some spaces
|
11
|
+
"title"
|
8
12
|
|
9
13
|
[break]: http://www.example.com/test/asdf.html
|
10
14
|
'Another title'
|
@@ -0,0 +1 @@
|
|
1
|
+
<p>You can say <code><span class="CodeRay">x = <span style="color:#036;font-weight:bold">Class</span>.new</span></code>, for example.</p>
|
@@ -0,0 +1 @@
|
|
1
|
+
You can say `x = Class.new`{: lang="ruby"}, for example.
|
@@ -2,17 +2,16 @@ Some para.
|
|
2
2
|
|
3
3
|
\begin{quote}
|
4
4
|
blockquote
|
5
|
-
|
6
|
-
|
7
5
|
\end{quote}
|
6
|
+
|
8
7
|
\begin{itemize}
|
9
8
|
\item a list
|
10
9
|
with some text
|
11
|
-
|
12
10
|
\end{itemize}
|
11
|
+
|
13
12
|
\begin{itemize}
|
14
13
|
\item other list
|
15
|
-
|
16
14
|
\end{itemize}
|
17
15
|
\begin{verbatim}code
|
18
16
|
\end{verbatim}
|
17
|
+
|
@@ -1,7 +1,10 @@
|
|
1
1
|
Some para.
|
2
|
+
|
2
3
|
[^footnote]: ignored definition
|
3
4
|
[^footnote]: Some footnote text
|
5
|
+
|
4
6
|
> blockquote
|
7
|
+
|
5
8
|
[^other]: some
|
6
9
|
foot
|
7
10
|
|
@@ -9,10 +12,13 @@ Some para.
|
|
9
12
|
|
10
13
|
* a list
|
11
14
|
with some text
|
15
|
+
|
12
16
|
[^tnote]: foot note
|
17
|
+
|
13
18
|
* other list
|
14
19
|
^
|
15
20
|
code
|
21
|
+
|
16
22
|
[^1]:
|
17
23
|
> a blockquote
|
18
24
|
and some para
|
@@ -1,6 +1,4 @@
|
|
1
|
-
This is some *ref.\footnote{Some foot note text
|
2
|
-
|
3
|
-
}
|
1
|
+
This is some *ref.\footnote{Some foot note text}
|
4
2
|
|
5
3
|
\begin{quote}
|
6
4
|
a blockquote \footnote{other text
|
@@ -8,23 +6,16 @@ with more lines
|
|
8
6
|
|
9
7
|
\begin{quote}
|
10
8
|
and a quote
|
11
|
-
|
12
|
-
|
9
|
+
\end{quote}}
|
13
10
|
\end{quote}
|
14
|
-
}
|
15
|
-
|
16
11
|
|
17
|
-
\end{quote}
|
18
12
|
\begin{itemize}
|
19
|
-
\item and a list item \footnote{some \emph{text}
|
20
|
-
|
21
|
-
}
|
22
|
-
|
13
|
+
\item and a list item \footnote{some \emph{text}}
|
23
14
|
\end{itemize}
|
15
|
+
|
24
16
|
\section*{And a header\footnote{\begin{verbatim}code block
|
25
17
|
continued here
|
26
|
-
\end{verbatim}
|
27
|
-
}}
|
18
|
+
\end{verbatim}}}
|
28
19
|
|
29
20
|
A marker without a definition [\^{}without].
|
30
21
|
|
@@ -2,5 +2,5 @@
|
|
2
2
|
This is <span>*text*</span>
|
3
3
|
This is <span><em>text</em></span>
|
4
4
|
This is <span><em>text</em></span>
|
5
|
-
This is <span>*nothing* <
|
5
|
+
This is <span>*nothing* <strong>to <em>fear</em></strong> about</span>.
|
6
6
|
This is <span><http://example.com></span>.</p>
|
@@ -2,5 +2,5 @@ This is <span markdown="1">*text*</span>
|
|
2
2
|
This is <span markdown="0">*text*</span>
|
3
3
|
This is <span markdown="span">*text*</span>
|
4
4
|
This is <span markdown="block">*text*</span>
|
5
|
-
This is <span markdown="0">*nothing* <
|
5
|
+
This is <span markdown="0">*nothing* <strong markdown="1">to *fear*</strong> about</span>.
|
6
6
|
This is <span markdown="0"><http://example.com></span>.
|
@@ -17,11 +17,13 @@ now </span>.</p>
|
|
17
17
|
|
18
18
|
<p>Auto-closing: <br /></p>
|
19
19
|
|
20
|
-
<p>
|
20
|
+
<p>Expanding: <textarea></textarea></p>
|
21
21
|
|
22
|
-
<p>
|
22
|
+
<p>An invalid tag: <hr></p>
|
23
23
|
|
24
|
-
<p>
|
24
|
+
<p>A <p>block tag</p>.</p>
|
25
|
+
|
26
|
+
<p>An invalid </closing> tag.</p>
|
25
27
|
|
26
28
|
<p>A <script>*not*</script> tag.</p>
|
27
29
|
|
@@ -1 +1 @@
|
|
1
|
-
<p>This is </p>
|
1
|
+
<p>This is {::something}paragraph{:/}</p>
|
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 11
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.11.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Thomas Leitner
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-
|
17
|
+
date: 2010-10-01 00:00:00 +02:00
|
18
18
|
default_executable: kramdown
|
19
19
|
dependencies: []
|
20
20
|
|
@@ -66,6 +66,7 @@ files:
|
|
66
66
|
- lib/kramdown/parser/kramdown/list.rb
|
67
67
|
- lib/kramdown/parser/kramdown/autolink.rb
|
68
68
|
- lib/kramdown/parser/kramdown/html_entity.rb
|
69
|
+
- lib/kramdown/parser/kramdown/block_boundary.rb
|
69
70
|
- lib/kramdown/parser/kramdown/paragraph.rb
|
70
71
|
- lib/kramdown/parser/kramdown/typographic_symbol.rb
|
71
72
|
- lib/kramdown/parser/kramdown/table.rb
|
@@ -87,6 +88,7 @@ files:
|
|
87
88
|
- lib/kramdown/parser/kramdown/codeblock.rb
|
88
89
|
- lib/kramdown/utils/html.rb
|
89
90
|
- lib/kramdown/utils/entities.rb
|
91
|
+
- lib/kramdown/utils/ordered_hash.rb
|
90
92
|
- lib/kramdown/version.rb
|
91
93
|
- lib/kramdown/error.rb
|
92
94
|
- lib/kramdown/converter/base.rb
|
@@ -127,11 +129,13 @@ files:
|
|
127
129
|
- test/testcases/span/05_html/normal.text
|
128
130
|
- test/testcases/span/escaped_chars/normal.html
|
129
131
|
- test/testcases/span/escaped_chars/normal.text
|
132
|
+
- test/testcases/span/03_codespan/highlighting.html
|
130
133
|
- test/testcases/span/03_codespan/errors.text
|
131
134
|
- test/testcases/span/03_codespan/normal.html
|
132
135
|
- test/testcases/span/03_codespan/empty.html
|
133
136
|
- test/testcases/span/03_codespan/empty.text
|
134
137
|
- test/testcases/span/03_codespan/errors.html
|
138
|
+
- test/testcases/span/03_codespan/highlighting.text
|
135
139
|
- test/testcases/span/03_codespan/normal.text
|
136
140
|
- test/testcases/span/abbreviations/abbrev_defs.html
|
137
141
|
- test/testcases/span/abbreviations/abbrev.text
|
@@ -241,8 +245,10 @@ files:
|
|
241
245
|
- test/testcases/block/12_extension/options3.html
|
242
246
|
- test/testcases/block/12_extension/comment.html
|
243
247
|
- test/testcases/block/12_extension/options.html
|
248
|
+
- test/testcases/block/12_extension/nomarkdown.kramdown
|
244
249
|
- test/testcases/block/12_extension/nomarkdown.text
|
245
250
|
- test/testcases/block/12_extension/options3.text
|
251
|
+
- test/testcases/block/12_extension/nomarkdown.latex
|
246
252
|
- test/testcases/block/09_html/html_and_codeblocks.options
|
247
253
|
- test/testcases/block/09_html/comment.text
|
248
254
|
- test/testcases/block/09_html/invalid_html_1.text
|
@@ -314,6 +320,7 @@ files:
|
|
314
320
|
- test/testcases/block/08_list/escaping.text
|
315
321
|
- test/testcases/block/08_list/escaping.html
|
316
322
|
- test/testcases/block/08_list/single_item.html
|
323
|
+
- test/testcases/block/08_list/lazy.html
|
317
324
|
- test/testcases/block/08_list/item_ial.text
|
318
325
|
- test/testcases/block/08_list/list_and_hr.text
|
319
326
|
- test/testcases/block/08_list/item_ial.html
|
@@ -321,6 +328,7 @@ files:
|
|
321
328
|
- test/testcases/block/08_list/list_and_others.html
|
322
329
|
- test/testcases/block/08_list/other_first_element.text
|
323
330
|
- test/testcases/block/08_list/single_item.text
|
331
|
+
- test/testcases/block/08_list/lazy.text
|
324
332
|
- test/testcases/block/08_list/list_and_others.text
|
325
333
|
- test/testcases/block/08_list/simple_ul.text
|
326
334
|
- test/testcases/block/08_list/simple_ol.text
|
@@ -331,6 +339,7 @@ files:
|
|
331
339
|
- test/testcases/block/04_header/with_auto_id_prefix.options
|
332
340
|
- test/testcases/block/04_header/atx_header.html
|
333
341
|
- test/testcases/block/04_header/setext_header_no_newline_at_end.text
|
342
|
+
- test/testcases/block/04_header/setext_header.html.19
|
334
343
|
- test/testcases/block/04_header/atx_header_no_newline_at_end.text
|
335
344
|
- test/testcases/block/04_header/setext_header.html
|
336
345
|
- test/testcases/block/04_header/with_auto_id_prefix.html
|
@@ -383,11 +392,11 @@ files:
|
|
383
392
|
- test/testcases/block/13_definition_list/multiple_terms.html
|
384
393
|
- test/testcases/block/13_definition_list/styled_terms.html
|
385
394
|
- test/testcases/block/05_blockquote/nested.text
|
386
|
-
- test/testcases/block/05_blockquote/
|
395
|
+
- test/testcases/block/05_blockquote/lazy.html
|
387
396
|
- test/testcases/block/05_blockquote/no_newline_at_end.text
|
388
397
|
- test/testcases/block/05_blockquote/indented.text
|
389
|
-
- test/testcases/block/05_blockquote/only_first_quoted.html
|
390
398
|
- test/testcases/block/05_blockquote/indented.html
|
399
|
+
- test/testcases/block/05_blockquote/lazy.text
|
391
400
|
- test/testcases/block/05_blockquote/no_newline_at_end.html
|
392
401
|
- test/testcases/block/05_blockquote/with_code_blocks.text
|
393
402
|
- test/testcases/block/05_blockquote/nested.html
|
@@ -405,13 +414,19 @@ files:
|
|
405
414
|
- test/testcases/block/06_codeblock/whitespace.text
|
406
415
|
- test/testcases/block/06_codeblock/with_eob_marker.text
|
407
416
|
- test/testcases/block/06_codeblock/tilde_syntax.html
|
417
|
+
- test/testcases/block/06_codeblock/no_newline_at_end_1.text
|
418
|
+
- test/testcases/block/06_codeblock/lazy.html
|
408
419
|
- test/testcases/block/06_codeblock/with_blank_line.html
|
409
420
|
- test/testcases/block/06_codeblock/tilde_syntax.text
|
421
|
+
- test/testcases/block/06_codeblock/with_ial.text
|
410
422
|
- test/testcases/block/06_codeblock/normal.html
|
411
423
|
- test/testcases/block/06_codeblock/no_newline_at_end.text
|
412
424
|
- test/testcases/block/06_codeblock/with_eob_marker.html
|
413
425
|
- test/testcases/block/06_codeblock/with_blank_line.text
|
426
|
+
- test/testcases/block/06_codeblock/with_ial.html
|
427
|
+
- test/testcases/block/06_codeblock/no_newline_at_end_1.html
|
414
428
|
- test/testcases/block/06_codeblock/error.html
|
429
|
+
- test/testcases/block/06_codeblock/lazy.text
|
415
430
|
- test/testcases/block/06_codeblock/whitespace.html
|
416
431
|
- test/testcases/block/06_codeblock/no_newline_at_end.html
|
417
432
|
- test/testcases/block/06_codeblock/error.text
|