kramdown 2.0.0 → 2.3.1

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.
Files changed (94) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTERS +13 -3
  3. data/README.md +8 -2
  4. data/VERSION +1 -1
  5. data/bin/kramdown +48 -19
  6. data/lib/kramdown/converter/base.rb +2 -1
  7. data/lib/kramdown/converter/html.rb +36 -29
  8. data/lib/kramdown/converter/kramdown.rb +12 -7
  9. data/lib/kramdown/converter/latex.rb +2 -2
  10. data/lib/kramdown/converter/math_engine/mathjax.rb +7 -33
  11. data/lib/kramdown/converter/syntax_highlighter.rb +1 -1
  12. data/lib/kramdown/converter/syntax_highlighter/rouge.rb +20 -10
  13. data/lib/kramdown/element.rb +24 -0
  14. data/lib/kramdown/options.rb +53 -12
  15. data/lib/kramdown/parser/base.rb +3 -1
  16. data/lib/kramdown/parser/html.rb +8 -8
  17. data/lib/kramdown/parser/kramdown.rb +8 -1
  18. data/lib/kramdown/parser/kramdown/abbreviation.rb +1 -1
  19. data/lib/kramdown/parser/kramdown/autolink.rb +2 -2
  20. data/lib/kramdown/parser/kramdown/blank_line.rb +2 -2
  21. data/lib/kramdown/parser/kramdown/block_boundary.rb +3 -2
  22. data/lib/kramdown/parser/kramdown/codespan.rb +13 -3
  23. data/lib/kramdown/parser/kramdown/emphasis.rb +1 -1
  24. data/lib/kramdown/parser/kramdown/extensions.rb +13 -7
  25. data/lib/kramdown/parser/kramdown/header.rb +3 -2
  26. data/lib/kramdown/parser/kramdown/html.rb +4 -10
  27. data/lib/kramdown/parser/kramdown/link.rb +3 -2
  28. data/lib/kramdown/parser/kramdown/list.rb +64 -33
  29. data/lib/kramdown/parser/kramdown/math.rb +1 -1
  30. data/lib/kramdown/parser/kramdown/paragraph.rb +3 -3
  31. data/lib/kramdown/parser/kramdown/table.rb +3 -3
  32. data/lib/kramdown/utils/html.rb +9 -0
  33. data/lib/kramdown/version.rb +1 -1
  34. data/man/man1/kramdown.1 +22 -1
  35. data/test/test_files.rb +27 -18
  36. data/test/test_location.rb +2 -2
  37. data/test/test_string_scanner_kramdown.rb +1 -1
  38. data/test/testcases/block/03_paragraph/standalone_image.html +5 -0
  39. data/test/testcases/block/03_paragraph/standalone_image.text +3 -0
  40. data/test/testcases/block/04_header/atx_header.html +6 -0
  41. data/test/testcases/block/04_header/atx_header.text +6 -0
  42. data/test/testcases/block/06_codeblock/guess_lang_css_class.html +15 -0
  43. data/test/testcases/block/06_codeblock/guess_lang_css_class.options +2 -0
  44. data/test/testcases/block/06_codeblock/guess_lang_css_class.text +13 -0
  45. data/test/testcases/block/06_codeblock/rouge/multiple.html +1 -1
  46. data/test/testcases/block/06_codeblock/rouge/simple.html +1 -1
  47. data/test/testcases/block/09_html/processing_instruction.html +5 -6
  48. data/test/testcases/block/09_html/standalone_image_in_div.htmlinput +7 -0
  49. data/test/testcases/block/09_html/standalone_image_in_div.text +8 -0
  50. data/test/testcases/block/09_html/table.kramdown +8 -0
  51. data/test/testcases/block/09_html/table.text +7 -0
  52. data/test/testcases/block/12_extension/options.html +4 -4
  53. data/test/testcases/block/12_extension/options.text +2 -0
  54. data/test/testcases/block/12_extension/options2.html +4 -4
  55. data/test/testcases/block/14_table/table_with_footnote.html +4 -4
  56. data/test/testcases/block/15_math/gh_128.html +1 -2
  57. data/test/testcases/block/15_math/normal.html +16 -15
  58. data/test/testcases/block/16_toc/toc_with_footnotes.html +4 -4
  59. data/test/testcases/cjk-line-break.html +4 -0
  60. data/test/testcases/cjk-line-break.options +1 -0
  61. data/test/testcases/cjk-line-break.text +12 -0
  62. data/test/testcases/span/02_emphasis/normal.html +4 -0
  63. data/test/testcases/span/02_emphasis/normal.text +4 -0
  64. data/test/testcases/span/03_codespan/normal-css-class.html +1 -0
  65. data/test/testcases/span/03_codespan/normal-css-class.options +2 -0
  66. data/test/testcases/span/03_codespan/normal-css-class.text +1 -0
  67. data/test/testcases/span/03_codespan/normal.html +4 -0
  68. data/test/testcases/span/03_codespan/normal.text +4 -0
  69. data/test/testcases/span/04_footnote/backlink_inline.html +21 -21
  70. data/test/testcases/span/04_footnote/backlink_text.html +4 -4
  71. data/test/testcases/span/04_footnote/footnote_nr.html +6 -6
  72. data/test/testcases/span/04_footnote/footnote_prefix.html +6 -6
  73. data/test/testcases/span/04_footnote/inside_footnote.html +9 -9
  74. data/test/testcases/span/04_footnote/markers.html +16 -16
  75. data/test/testcases/span/04_footnote/placement.html +4 -4
  76. data/test/testcases/span/04_footnote/regexp_problem.html +4 -4
  77. data/test/testcases/span/04_footnote/without_backlink.html +3 -3
  78. data/test/testcases/span/05_html/normal.html +1 -1
  79. data/test/testcases/span/abbreviations/abbrev_in_html.html +9 -0
  80. data/test/testcases/span/abbreviations/abbrev_in_html.text +10 -0
  81. data/test/testcases/span/abbreviations/in_footnote.html +4 -4
  82. data/test/testcases/span/math/normal.html +4 -4
  83. data/test/testcases/span/text_substitutions/entities.html +1 -1
  84. data/test/testcases/span/text_substitutions/entities.text +1 -1
  85. metadata +40 -15
  86. data/test/testcases/block/15_math/mathjax_preview.html +0 -4
  87. data/test/testcases/block/15_math/mathjax_preview.options +0 -2
  88. data/test/testcases/block/15_math/mathjax_preview.text +0 -5
  89. data/test/testcases/block/15_math/mathjax_preview_as_code.html +0 -4
  90. data/test/testcases/block/15_math/mathjax_preview_as_code.options +0 -3
  91. data/test/testcases/block/15_math/mathjax_preview_as_code.text +0 -5
  92. data/test/testcases/block/15_math/mathjax_preview_simple.html +0 -4
  93. data/test/testcases/block/15_math/mathjax_preview_simple.options +0 -2
  94. data/test/testcases/block/15_math/mathjax_preview_simple.text +0 -5
@@ -18,7 +18,7 @@ describe 'location' do
18
18
  def check_element_for_location(element)
19
19
  if (match = /^line-(\d+)/.match(element.attr['class'] || ''))
20
20
  expected_line = match[1].to_i
21
- element.options[:location].must_equal(expected_line)
21
+ assert_equal(expected_line, element.options[:location])
22
22
  end
23
23
  element.children.each do |child|
24
24
  check_element_for_location(child)
@@ -187,7 +187,7 @@ describe 'location' do
187
187
  *[duplicate]: The second definition
188
188
  )
189
189
  doc = Kramdown::Document.new(test_string.strip)
190
- doc.warnings.must_equal ["Duplicate abbreviation ID 'duplicate' on line 4 - overwriting"]
190
+ assert_equal(["Duplicate abbreviation ID 'duplicate' on line 4 - overwriting"], doc.warnings)
191
191
  end
192
192
 
193
193
  it 'handles abbreviations' do
@@ -21,7 +21,7 @@ describe Kramdown::Utils::StringScanner do
21
21
  it "computes the correct current_line_number for example ##{i + 1}" do
22
22
  str_sc = Kramdown::Utils::StringScanner.new(test_string)
23
23
  scan_regexes.each {|scan_re| str_sc.scan_until(scan_re) }
24
- str_sc.current_line_number.must_equal expect
24
+ assert_equal(expect, str_sc.current_line_number)
25
25
  end
26
26
  end
27
27
  end
@@ -5,4 +5,9 @@
5
5
  <figcaption>standalone image</figcaption>
6
6
  </figure>
7
7
 
8
+ <figure id="block-id" class="block-class" block-key="block-value">
9
+ <img src="some.jpg" alt="standalone image" id="id" class="class" key="value" />
10
+ <figcaption>standalone image</figcaption>
11
+ </figure>
12
+
8
13
  <p>para</p>
@@ -3,4 +3,7 @@ para
3
3
 
4
4
  ![standalone image](some.jpg){:#id .class key="value" standalone}
5
5
 
6
+ ![standalone image](some.jpg){:#id .class key="value" standalone}
7
+ {:#block-id .block-class block-key="block-value"}
8
+
6
9
  para
@@ -26,6 +26,12 @@
26
26
  ### not a header</p>
27
27
  </blockquote>
28
28
 
29
+ <h1>header</h1>
30
+
31
+ <h1>header</h1>
32
+
33
+ <h1>header</h1>
34
+
29
35
  <h1>header #</h1>
30
36
 
31
37
  <h1>header</h1>
@@ -23,6 +23,12 @@ paragraph
23
23
  > blockquote
24
24
  ### not a header
25
25
 
26
+ # header #
27
+
28
+ # header#
29
+
30
+ #header#
31
+
26
32
  # header \#
27
33
 
28
34
  # header
@@ -0,0 +1,15 @@
1
+ <div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>class Foo
2
+ def bar
3
+ puts 'Hello'
4
+ end
5
+ end
6
+ </code></pre>
7
+ </div></div>
8
+
9
+ <div class="highlighter-rouge"><div class="highlight"><pre class="highlight"><code>class Foo
10
+ def bar
11
+ puts 'Hello'
12
+ end
13
+ end
14
+ </code></pre>
15
+ </div></div>
@@ -0,0 +1,2 @@
1
+ :syntax_highlighter_opts:
2
+ guess_lang: true
@@ -0,0 +1,13 @@
1
+ ~~~
2
+ class Foo
3
+ def bar
4
+ puts 'Hello'
5
+ end
6
+ end
7
+ ~~~
8
+
9
+ class Foo
10
+ def bar
11
+ puts 'Hello'
12
+ end
13
+ end
@@ -6,6 +6,6 @@
6
6
  </code></pre>
7
7
  </div></div></div>
8
8
 
9
- <div class="language-php highlighter-rouge"><div class="custom-class"><div class="highlight"><pre class="highlight"><code><span class="nv">$foo</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Bar</span><span class="p">;</span>
9
+ <div class="language-php highlighter-rouge"><div class="custom-class"><div class="highlight"><pre class="highlight"><code><span class="nv">$foo</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Bar</span><span class="p">;</span>
10
10
  </code></pre>
11
11
  </div></div></div>
@@ -5,6 +5,6 @@
5
5
  </code></pre>
6
6
  </div></div>
7
7
 
8
- <div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$foo</span> <span class="o">=</span> <span class="k">new</span> <span class="nx">Bar</span><span class="p">;</span>
8
+ <div class="language-php highlighter-rouge"><div class="highlight"><pre class="highlight"><code><span class="nv">$foo</span> <span class="o">=</span> <span class="k">new</span> <span class="nc">Bar</span><span class="p">;</span>
9
9
  </code></pre>
10
10
  </div></div>
@@ -1,13 +1,12 @@
1
- <?xml version="1.0"?>
1
+ <p>&lt;?xml version=”1.0”?&gt;</p>
2
2
 
3
3
  <p>para</p>
4
4
 
5
- <? test ?>
6
- <p>para</p>
5
+ <p>&lt;? test ?&gt; para</p>
7
6
 
8
7
  <p>other</p>
9
8
 
10
- <?
11
- multiline *text*
9
+ <p>&lt;?
10
+ multiline <em>text</em>
12
11
  is allowed
13
- ?>
12
+ ?&gt;</p>
@@ -0,0 +1,7 @@
1
+ <div class="example-1">
2
+ <img src="src.png" alt="inside" />
3
+ </div>
4
+
5
+ <div class="example-2">
6
+ <a href="website.html">text</a>
7
+ </div>
@@ -0,0 +1,8 @@
1
+ <div class="example-1" markdown="1">
2
+ ![inside](src.png)
3
+ </div>
4
+
5
+ <div class="example-2" markdown="1">
6
+ [text](website.html)
7
+ </div>
8
+
@@ -0,0 +1,8 @@
1
+ <table>
2
+ <tr>
3
+ <th>test</th>
4
+ <th></th>
5
+ <td></td>
6
+ </tr>
7
+ </table>
8
+
@@ -0,0 +1,7 @@
1
+ <table>
2
+ <tr>
3
+ <th>test</th>
4
+ <th></th>
5
+ <td></td>
6
+ </tr>
7
+ </table>
@@ -10,12 +10,12 @@ some <span>*para*</span>
10
10
  <p>some <span><em>para</em></span></p>
11
11
  </div>
12
12
 
13
- <p>Some text<sup id="fnref:ab"><a href="#fn:ab" class="footnote">10</a></sup>.</p>
13
+ <p>Some text<sup id="fnref:ab" role="doc-noteref"><a href="#fn:ab" class="footnote" rel="footnote">10</a></sup>.</p>
14
14
 
15
- <div class="footnotes">
15
+ <div class="footnotes" role="doc-endnotes">
16
16
  <ol start="10">
17
- <li id="fn:ab">
18
- <p>Some text. <a href="#fnref:ab" class="reversefootnote">&#8617;</a></p>
17
+ <li id="fn:ab" role="doc-endnote">
18
+ <p>Some text. <a href="#fnref:ab" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
19
19
  </li>
20
20
  </ol>
21
21
  </div>
@@ -19,3 +19,5 @@ some <span>*para*</span>
19
19
  Some text[^ab].
20
20
 
21
21
  [^ab]: Some text.
22
+
23
+ {::options template="/etc/passwd" /}
@@ -1,10 +1,10 @@
1
1
 
2
- <p>Some text<sup id="fnref:ab"><a href="#fn:ab" class="footnote">1</a></sup>.</p>
2
+ <p>Some text<sup id="fnref:ab" role="doc-noteref"><a href="#fn:ab" class="footnote" rel="footnote">1</a></sup>.</p>
3
3
 
4
- <div class="footnotes">
4
+ <div class="footnotes" role="doc-endnotes">
5
5
  <ol>
6
- <li id="fn:ab">
7
- <p>Some text. <a href="#fnref:ab" class="reversefootnote">&#8617;</a></p>
6
+ <li id="fn:ab" role="doc-endnote">
7
+ <p>Some text. <a href="#fnref:ab" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
8
8
  </li>
9
9
  </ol>
10
10
  </div>
@@ -1,7 +1,7 @@
1
1
  <table>
2
2
  <tbody>
3
3
  <tr>
4
- <td>this is <sup id="fnref:1"><a href="#fn:1" class="footnote">1</a></sup></td>
4
+ <td>this is <sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup></td>
5
5
  <td>a table</td>
6
6
  </tr>
7
7
  <tr>
@@ -11,15 +11,15 @@
11
11
  </tbody>
12
12
  </table>
13
13
 
14
- <div class="footnotes">
14
+ <div class="footnotes" role="doc-endnotes">
15
15
  <ol>
16
- <li id="fn:1">
16
+ <li id="fn:1" role="doc-endnote">
17
17
  <p>Something</p>
18
18
 
19
19
  <blockquote>
20
20
  <p>special here</p>
21
21
  </blockquote>
22
- <p><a href="#fnref:1" class="reversefootnote">&#8617;</a></p>
22
+ <p><a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
23
23
  </li>
24
24
  </ol>
25
25
  </div>
@@ -1,2 +1 @@
1
- <script type="math/tex; mode=display">% <![CDATA[
2
- alert('a') alert('b<') %]]></script>
1
+ \[&lt;script&gt;alert('a')&lt;/script&gt; &lt;script&gt;alert('b&lt;')&lt;/script&gt;\]
@@ -1,29 +1,30 @@
1
1
  <p>This is a para.
2
- <script type="math/tex">\text{LaTeX} \lambda_5</script></p>
2
+ \(\text{LaTeX} \lambda_5\)</p>
3
3
 
4
- <script type="math/tex; mode=display">\lambda_5 = \alpha + 4</script>
4
+ \[\lambda_5 = \alpha + 4\]
5
5
 
6
- <p><script type="math/tex">\lambda_\alpha > 5</script>
6
+ <p>\(\lambda_\alpha &gt; 5\)
7
7
  This is a para.</p>
8
8
 
9
- <script type="math/tex; mode=display">% <![CDATA[
10
- \begin{align*}
11
- &=5 \\
12
- &=6 \\
13
- \end{align*} %]]></script>
9
+ \[\begin{align*}
10
+ &amp;=5 \\
11
+ &amp;=6 \\
12
+ \end{align*}\]
14
13
 
15
- <script type="math/tex; mode=display">5+5</script>
14
+ \[5+5\]
16
15
 
17
- <script type="math/tex; mode=display">5+5</script>
16
+ \[5+5\]
18
17
 
19
- <script type="math/tex; mode=display">5+5</script>
18
+ \[5+5\]
20
19
 
21
- <script type="math/tex; mode=display">5+5</script>
20
+ \[5+5\]
22
21
 
23
22
  <pre><code>$$5+5$$
24
23
  </code></pre>
25
24
 
26
- <script type="math/tex; mode=display">5+5</script>
27
- <script type="math/tex; mode=display">5+5</script>
25
+ <div class="cls">\[5+5\]
26
+ </div>
27
+ <div class="cls">\[5+5\]
28
+ </div>
28
29
 
29
- <script type="math/tex; mode=display">|x| = 5</script>
30
+ \[|x| = 5\]
@@ -2,12 +2,12 @@
2
2
  <li><a href="#header1-level-1" id="markdown-toc-header1-level-1">Header level 1</a></li>
3
3
  </ul>
4
4
 
5
- <h1 id="header1-level-1">Header<sup id="fnref:1"><a href="#fn:1" class="footnote">1</a></sup> level 1</h1>
5
+ <h1 id="header1-level-1">Header<sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup> level 1</h1>
6
6
 
7
- <div class="footnotes">
7
+ <div class="footnotes" role="doc-endnotes">
8
8
  <ol>
9
- <li id="fn:1">
10
- <p>Some footnote content here <a href="#fnref:1" class="reversefootnote">&#8617;</a></p>
9
+ <li id="fn:1" role="doc-endnote">
10
+ <p>Some footnote content here <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
11
11
  </li>
12
12
  </ol>
13
13
  </div>
@@ -0,0 +1,4 @@
1
+ <p>一二三四五</p>
2
+
3
+ <p>あいうえお</p>
4
+
@@ -0,0 +1 @@
1
+ :remove_line_breaks_for_cjk: true
@@ -0,0 +1,12 @@
1
+
2
+
3
+
4
+
5
+
6
+
7
+
8
+
9
+
10
+
11
+
12
+
@@ -59,3 +59,7 @@ Or that *<em>that*</em> way</p>
59
59
  <li>`<em>test</em>&#8217;</li>
60
60
  <li>„<em>test</em>“</li>
61
61
  </ul>
62
+
63
+ <p>it&#8211;by design&#8211;<em>cannot have side-effects</em>.</p>
64
+
65
+ <p>it&#8212;by design&#8212;<em>cannot have side-effects</em>.</p>
@@ -57,3 +57,7 @@ Or that \**that\** way
57
57
  - “_test_”
58
58
  - \`_test_'
59
59
  - „_test_“
60
+
61
+ it--by design--_cannot have side-effects_.
62
+
63
+ it---by design---_cannot have side-effects_.
@@ -0,0 +1 @@
1
+ <p>This is a <code class="highlighter-rouge">code-span</code></p>
@@ -0,0 +1,2 @@
1
+ :syntax_highlighter_opts:
2
+ guess_lang: true
@@ -0,0 +1 @@
1
+ This is a `code-span`
@@ -14,3 +14,7 @@ As `are` these!</p>
14
14
  <p>No <code>literal backtick</code>.</p>
15
15
 
16
16
  <p><code>something</code></p>
17
+
18
+ <p>` `</p>
19
+
20
+ <p>a ` `</p>
@@ -14,3 +14,7 @@ As \`are\` these!
14
14
  No `` literal backtick``.
15
15
 
16
16
  `something`
17
+
18
+ ` `
19
+
20
+ a ` `
@@ -1,30 +1,30 @@
1
- <p>This is <sup id="fnref:paragraph"><a href="#fn:paragraph" class="footnote">1</a></sup><sup id="fnref:header"><a href="#fn:header" class="footnote">2</a></sup><sup id="fnref:blockquote"><a href="#fn:blockquote" class="footnote">3</a></sup><sup id="fnref:codeblock"><a href="#fn:codeblock" class="footnote">4</a></sup><sup id="fnref:list"><a href="#fn:list" class="footnote">5</a></sup><sup id="fnref:table"><a href="#fn:table" class="footnote">6</a></sup><sup id="fnref:hrule"><a href="#fn:hrule" class="footnote">7</a></sup><sup id="fnref:mathblock"><a href="#fn:mathblock" class="footnote">8</a></sup><sup id="fnref:html"><a href="#fn:html" class="footnote">9</a></sup></p>
1
+ <p>This is <sup id="fnref:paragraph" role="doc-noteref"><a href="#fn:paragraph" class="footnote" rel="footnote">1</a></sup><sup id="fnref:header" role="doc-noteref"><a href="#fn:header" class="footnote" rel="footnote">2</a></sup><sup id="fnref:blockquote" role="doc-noteref"><a href="#fn:blockquote" class="footnote" rel="footnote">3</a></sup><sup id="fnref:codeblock" role="doc-noteref"><a href="#fn:codeblock" class="footnote" rel="footnote">4</a></sup><sup id="fnref:list" role="doc-noteref"><a href="#fn:list" class="footnote" rel="footnote">5</a></sup><sup id="fnref:table" role="doc-noteref"><a href="#fn:table" class="footnote" rel="footnote">6</a></sup><sup id="fnref:hrule" role="doc-noteref"><a href="#fn:hrule" class="footnote" rel="footnote">7</a></sup><sup id="fnref:mathblock" role="doc-noteref"><a href="#fn:mathblock" class="footnote" rel="footnote">8</a></sup><sup id="fnref:html" role="doc-noteref"><a href="#fn:html" class="footnote" rel="footnote">9</a></sup></p>
2
2
 
3
- <div class="footnotes">
3
+ <div class="footnotes" role="doc-endnotes">
4
4
  <ol>
5
- <li id="fn:paragraph">
5
+ <li id="fn:paragraph" role="doc-endnote">
6
6
 
7
- <p>A paragraph <a href="#fnref:paragraph" class="reversefootnote">&#8617;</a></p>
7
+ <p>A paragraph <a href="#fnref:paragraph" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
8
8
  </li>
9
- <li id="fn:header">
9
+ <li id="fn:header" role="doc-endnote">
10
10
 
11
- <h1 id="a-header">A header <a href="#fnref:header" class="reversefootnote">&#8617;</a></h1>
11
+ <h1 id="a-header">A header <a href="#fnref:header" class="reversefootnote" role="doc-backlink">&#8617;</a></h1>
12
12
  </li>
13
- <li id="fn:blockquote">
13
+ <li id="fn:blockquote" role="doc-endnote">
14
14
 
15
15
  <blockquote>
16
16
  <p>blockquote</p>
17
17
 
18
- <p>paragraph <a href="#fnref:blockquote" class="reversefootnote">&#8617;</a></p>
18
+ <p>paragraph <a href="#fnref:blockquote" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
19
19
  </blockquote>
20
20
  </li>
21
- <li id="fn:codeblock">
21
+ <li id="fn:codeblock" role="doc-endnote">
22
22
 
23
23
  <pre><code>codeblock
24
24
  </code></pre>
25
- <p><a href="#fnref:codeblock" class="reversefootnote">&#8617;</a></p>
25
+ <p><a href="#fnref:codeblock" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
26
26
  </li>
27
- <li id="fn:list">
27
+ <li id="fn:list" role="doc-endnote">
28
28
 
29
29
  <ul>
30
30
  <li>item 1</li>
@@ -36,14 +36,14 @@
36
36
  <blockquote>
37
37
  <p>blockquote</p>
38
38
 
39
- <h1 id="header">header <a href="#fnref:list" class="reversefootnote">&#8617;</a></h1>
39
+ <h1 id="header">header <a href="#fnref:list" class="reversefootnote" role="doc-backlink">&#8617;</a></h1>
40
40
  </blockquote>
41
41
  </li>
42
42
  </ul>
43
43
  </li>
44
44
  </ul>
45
45
  </li>
46
- <li id="fn:table">
46
+ <li id="fn:table" role="doc-endnote">
47
47
 
48
48
  <table>
49
49
  <tbody>
@@ -57,23 +57,23 @@
57
57
  </tr>
58
58
  </tbody>
59
59
  </table>
60
- <p><a href="#fnref:table" class="reversefootnote">&#8617;</a></p>
60
+ <p><a href="#fnref:table" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
61
61
  </li>
62
- <li id="fn:hrule">
62
+ <li id="fn:hrule" role="doc-endnote">
63
63
 
64
64
  <hr />
65
- <p><a href="#fnref:hrule" class="reversefootnote">&#8617;</a></p>
65
+ <p><a href="#fnref:hrule" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
66
66
  </li>
67
- <li id="fn:mathblock">
67
+ <li id="fn:mathblock" role="doc-endnote">
68
68
 
69
- <script type="math/tex; mode=display">x + 2</script>
70
- <p><a href="#fnref:mathblock" class="reversefootnote">&#8617;</a></p>
69
+ \[x + 2\]
70
+ <p><a href="#fnref:mathblock" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
71
71
  </li>
72
- <li id="fn:html">
72
+ <li id="fn:html" role="doc-endnote">
73
73
 
74
74
  <div>test
75
75
  </div>
76
- <p><a href="#fnref:html" class="reversefootnote">&#8617;</a></p>
76
+ <p><a href="#fnref:html" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
77
77
  </li>
78
78
  </ol>
79
79
  </div>