kramdown 2.3.2 → 2.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (72) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTERS +11 -2
  3. data/VERSION +1 -1
  4. data/bin/kramdown +15 -12
  5. data/lib/kramdown/converter/base.rb +2 -2
  6. data/lib/kramdown/converter/html.rb +23 -15
  7. data/lib/kramdown/converter/kramdown.rb +31 -21
  8. data/lib/kramdown/converter/latex.rb +11 -10
  9. data/lib/kramdown/converter/man.rb +3 -3
  10. data/lib/kramdown/converter/math_engine/mathjax.rb +1 -1
  11. data/lib/kramdown/converter/remove_html_tags.rb +5 -4
  12. data/lib/kramdown/document.rb +1 -1
  13. data/lib/kramdown/element.rb +1 -1
  14. data/lib/kramdown/options.rb +50 -15
  15. data/lib/kramdown/parser/base.rb +6 -0
  16. data/lib/kramdown/parser/html.rb +24 -18
  17. data/lib/kramdown/parser/kramdown/abbreviation.rb +4 -2
  18. data/lib/kramdown/parser/kramdown/codespan.rb +1 -1
  19. data/lib/kramdown/parser/kramdown/emphasis.rb +6 -1
  20. data/lib/kramdown/parser/kramdown/escaped_chars.rb +1 -1
  21. data/lib/kramdown/parser/kramdown/extensions.rb +6 -6
  22. data/lib/kramdown/parser/kramdown/html.rb +26 -23
  23. data/lib/kramdown/parser/kramdown/html_entity.rb +1 -1
  24. data/lib/kramdown/parser/kramdown/link.rb +4 -4
  25. data/lib/kramdown/parser/kramdown/list.rb +19 -18
  26. data/lib/kramdown/parser/kramdown/smart_quotes.rb +1 -1
  27. data/lib/kramdown/parser/kramdown.rb +5 -4
  28. data/lib/kramdown/utils/entities.rb +661 -5
  29. data/lib/kramdown/utils/html.rb +1 -1
  30. data/lib/kramdown/utils/unidecoder.rb +9 -13
  31. data/lib/kramdown/version.rb +1 -1
  32. data/man/man1/kramdown.1 +25 -0
  33. data/test/test_files.rb +11 -0
  34. data/test/testcases/block/03_paragraph/to_kramdown.kramdown +7 -0
  35. data/test/testcases/block/03_paragraph/to_kramdown.text +5 -0
  36. data/test/testcases/block/04_header/with_header_links.html +7 -0
  37. data/test/testcases/block/04_header/with_header_links.options +2 -0
  38. data/test/testcases/block/04_header/with_header_links.text +8 -0
  39. data/test/testcases/block/04_header/with_line_break.html +1 -0
  40. data/test/testcases/block/04_header/with_line_break.text +1 -0
  41. data/test/testcases/block/08_list/escaping.html +4 -0
  42. data/test/testcases/block/08_list/escaping.text +4 -0
  43. data/test/testcases/block/08_list/nested_compact.kramdown +7 -0
  44. data/test/testcases/block/08_list/nested_compact.text +6 -0
  45. data/test/testcases/block/08_list/special_cases.html +10 -0
  46. data/test/testcases/block/08_list/special_cases.text +9 -0
  47. data/test/testcases/block/09_html/cdata_section.html +10 -0
  48. data/test/testcases/block/09_html/cdata_section.text +10 -0
  49. data/test/testcases/block/09_html/html_to_native/table_simple.html +3 -0
  50. data/test/testcases/block/09_html/html_to_native/table_simple.text +3 -0
  51. data/test/testcases/block/12_extension/options.html +2 -2
  52. data/test/testcases/block/12_extension/options2.html +2 -2
  53. data/test/testcases/block/14_table/table_with_footnote.html +2 -2
  54. data/test/testcases/block/16_toc/toc_with_footnotes.html +2 -2
  55. data/test/testcases/span/02_emphasis/normal.html +6 -1
  56. data/test/testcases/span/02_emphasis/normal.text +5 -0
  57. data/test/testcases/span/04_footnote/backlink_inline.html +10 -10
  58. data/test/testcases/span/04_footnote/backlink_text.html +2 -2
  59. data/test/testcases/span/04_footnote/footnote_link_text.html +12 -0
  60. data/test/testcases/span/04_footnote/footnote_link_text.options +1 -0
  61. data/test/testcases/span/04_footnote/footnote_link_text.text +4 -0
  62. data/test/testcases/span/04_footnote/footnote_nr.html +3 -3
  63. data/test/testcases/span/04_footnote/footnote_prefix.html +3 -3
  64. data/test/testcases/span/04_footnote/inside_footnote.html +6 -6
  65. data/test/testcases/span/04_footnote/markers.html +10 -10
  66. data/test/testcases/span/04_footnote/placement.html +2 -2
  67. data/test/testcases/span/04_footnote/regexp_problem.html +2 -2
  68. data/test/testcases/span/04_footnote/without_backlink.html +2 -2
  69. data/test/testcases/span/abbreviations/abbrev.html +4 -0
  70. data/test/testcases/span/abbreviations/abbrev.text +7 -0
  71. data/test/testcases/span/abbreviations/in_footnote.html +2 -2
  72. metadata +23 -9
@@ -1,12 +1,12 @@
1
1
  <h1>Something</h1>
2
- <p>something<sup id="fnref:note1" role="doc-noteref"><a href="#fn:note1" class="footnote" rel="footnote">1</a></sup>.</p>
2
+ <p>something<sup id="fnref:note1"><a href="#fn:note1" class="footnote" rel="footnote" role="doc-noteref">1</a></sup>.</p>
3
3
 
4
4
  <h1>Footnotes</h1>
5
5
 
6
6
  <h1>Test</h1>
7
7
  <div class="footnotes" role="doc-endnotes">
8
8
  <ol>
9
- <li id="fn:note1" role="doc-endnote">
9
+ <li id="fn:note1">
10
10
 
11
11
  <p>A note&nbsp;<a href="#fnref:note1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
12
12
  </li>
@@ -1,8 +1,8 @@
1
- <p>Some footnote here<sup id="fnref:fn" role="doc-noteref"><a href="#fn:fn" class="footnote" rel="footnote">1</a></sup></p>
1
+ <p>Some footnote here<sup id="fnref:fn"><a href="#fn:fn" class="footnote" rel="footnote" role="doc-noteref">1</a></sup></p>
2
2
 
3
3
  <div class="footnotes" role="doc-endnotes">
4
4
  <ol>
5
- <li id="fn:fn" role="doc-endnote">
5
+ <li id="fn:fn">
6
6
  <p>Some text here</p>
7
7
  </li>
8
8
  </ol>
@@ -19,3 +19,7 @@
19
19
 
20
20
  <p>This is <abbr class="testit test" title="Some text here">awesome</abbr>.</p>
21
21
 
22
+ <p>hello <abbr title="baz">foo bar</abbr> babble.</p>
23
+
24
+ <p>hello <abbr title="baz">foo
25
+ bar</abbr> babble.</p>
@@ -32,3 +32,10 @@ This is awesome.
32
32
  {:.testit}
33
33
  *[awesome]: Some text here
34
34
  {:.test}
35
+
36
+ *[foo bar]: baz
37
+
38
+ hello foo bar babble.
39
+
40
+ hello foo
41
+ bar babble.
@@ -1,8 +1,8 @@
1
- <p>There is a <abbr title="Text File">TXT</abbr> file here. <sup id="fnref:1" role="doc-noteref"><a href="#fn:1" class="footnote" rel="footnote">1</a></sup></p>
1
+ <p>There is a <abbr title="Text File">TXT</abbr> file here. <sup id="fnref:1"><a href="#fn:1" class="footnote" rel="footnote" role="doc-noteref">1</a></sup></p>
2
2
 
3
3
  <div class="footnotes" role="doc-endnotes">
4
4
  <ol>
5
- <li id="fn:1" role="doc-endnote">
5
+ <li id="fn:1">
6
6
  <p>A <abbr title="Text File">TXT</abbr> file. <a href="#fnref:1" class="reversefootnote" role="doc-backlink">&#8617;</a></p>
7
7
  </li>
8
8
  </ol>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kramdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.2
4
+ version: 2.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Leitner
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-18 00:00:00.000000000 Z
11
+ date: 2024-11-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rexml
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 3.3.6
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 3.3.6
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: minitest
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -170,6 +170,8 @@ files:
170
170
  - test/testcases/block/03_paragraph/one_para.text
171
171
  - test/testcases/block/03_paragraph/standalone_image.html
172
172
  - test/testcases/block/03_paragraph/standalone_image.text
173
+ - test/testcases/block/03_paragraph/to_kramdown.kramdown
174
+ - test/testcases/block/03_paragraph/to_kramdown.text
173
175
  - test/testcases/block/03_paragraph/two_para.html
174
176
  - test/testcases/block/03_paragraph/two_para.text
175
177
  - test/testcases/block/03_paragraph/with_html_to_native.html
@@ -197,6 +199,11 @@ files:
197
199
  - test/testcases/block/04_header/with_auto_ids.html
198
200
  - test/testcases/block/04_header/with_auto_ids.options
199
201
  - test/testcases/block/04_header/with_auto_ids.text
202
+ - test/testcases/block/04_header/with_header_links.html
203
+ - test/testcases/block/04_header/with_header_links.options
204
+ - test/testcases/block/04_header/with_header_links.text
205
+ - test/testcases/block/04_header/with_line_break.html
206
+ - test/testcases/block/04_header/with_line_break.text
200
207
  - test/testcases/block/05_blockquote/indented.html
201
208
  - test/testcases/block/05_blockquote/indented.text
202
209
  - test/testcases/block/05_blockquote/lazy.html
@@ -293,6 +300,8 @@ files:
293
300
  - test/testcases/block/08_list/mixed.text
294
301
  - test/testcases/block/08_list/nested.html
295
302
  - test/testcases/block/08_list/nested.text
303
+ - test/testcases/block/08_list/nested_compact.kramdown
304
+ - test/testcases/block/08_list/nested_compact.text
296
305
  - test/testcases/block/08_list/other_first_element.html
297
306
  - test/testcases/block/08_list/other_first_element.text
298
307
  - test/testcases/block/08_list/simple_ol.html
@@ -303,6 +312,8 @@ files:
303
312
  - test/testcases/block/08_list/single_item.text
304
313
  - test/testcases/block/08_list/special_cases.html
305
314
  - test/testcases/block/08_list/special_cases.text
315
+ - test/testcases/block/09_html/cdata_section.html
316
+ - test/testcases/block/09_html/cdata_section.text
306
317
  - test/testcases/block/09_html/comment.html
307
318
  - test/testcases/block/09_html/comment.text
308
319
  - test/testcases/block/09_html/content_model/deflists.html
@@ -544,6 +555,9 @@ files:
544
555
  - test/testcases/span/04_footnote/definitions.html
545
556
  - test/testcases/span/04_footnote/definitions.latex
546
557
  - test/testcases/span/04_footnote/definitions.text
558
+ - test/testcases/span/04_footnote/footnote_link_text.html
559
+ - test/testcases/span/04_footnote/footnote_link_text.options
560
+ - test/testcases/span/04_footnote/footnote_link_text.text
547
561
  - test/testcases/span/04_footnote/footnote_nr.html
548
562
  - test/testcases/span/04_footnote/footnote_nr.latex
549
563
  - test/testcases/span/04_footnote/footnote_nr.options
@@ -644,7 +658,7 @@ homepage: http://kramdown.gettalong.org
644
658
  licenses:
645
659
  - MIT
646
660
  metadata: {}
647
- post_install_message:
661
+ post_install_message:
648
662
  rdoc_options:
649
663
  - "--main"
650
664
  - lib/kramdown/document.rb
@@ -654,15 +668,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
654
668
  requirements:
655
669
  - - ">="
656
670
  - !ruby/object:Gem::Version
657
- version: '2.3'
671
+ version: '2.5'
658
672
  required_rubygems_version: !ruby/object:Gem::Requirement
659
673
  requirements:
660
674
  - - ">="
661
675
  - !ruby/object:Gem::Version
662
676
  version: '0'
663
677
  requirements: []
664
- rubygems_version: 3.2.32
665
- signing_key:
678
+ rubygems_version: 3.5.3
679
+ signing_key:
666
680
  specification_version: 4
667
681
  summary: kramdown is a fast, pure-Ruby Markdown-superset converter.
668
682
  test_files: []