Hello community,
here is the log from the commit of package rubygem-kramdown for
openSUSE:Factory checked in at 2020-05-11 13:41:20
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-kramdown (Old)
and /work/SRC/openSUSE:Factory/.rubygem-kramdown.new.2738 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-kramdown"
Mon May 11 13:41:20 2020 rev:14 rq:802341 version:2.2.1
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-kramdown/rubygem-kramdown.changes
2019-06-19 21:00:18.810083722 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-kramdown.new.2738/rubygem-kramdown.changes
2020-05-11 13:41:25.589128733 +0200
@@ -1,0 +2,6 @@
+Thu May 7 20:59:37 UTC 2020 - Stephan Kulow <[email protected]>
+
+- updated to version 2.2.1
+ no changelog found
+
+-------------------------------------------------------------------
Old:
----
kramdown-2.1.0.gem
New:
----
kramdown-2.2.1.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-kramdown.spec ++++++
--- /var/tmp/diff_new_pack.oZuAmS/_old 2020-05-11 13:41:26.589130855 +0200
+++ /var/tmp/diff_new_pack.oZuAmS/_new 2020-05-11 13:41:26.593130864 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-kramdown
#
-# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2020 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
#
Name: rubygem-kramdown
-Version: 2.1.0
+Version: 2.2.1
Release: 0
%define mod_name kramdown
%define mod_full_name %{mod_name}-%{version}
@@ -34,7 +34,7 @@
BuildRequires: %{rubygem rdoc > 3.10}
BuildRequires: ruby-macros >= 5
BuildRequires: update-alternatives
-Url: http://kramdown.gettalong.org
+URL: http://kramdown.gettalong.org
Source: https://rubygems.org/gems/%{mod_full_name}.gem
Source1: gem2rpm.yml
Summary: kramdown is a fast, pure-Ruby Markdown-superset converter
++++++ kramdown-2.1.0.gem -> kramdown-2.2.1.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CONTRIBUTERS new/CONTRIBUTERS
--- old/CONTRIBUTERS 2019-01-31 20:20:09.000000000 +0100
+++ new/CONTRIBUTERS 2020-04-23 16:16:29.000000000 +0200
@@ -1,13 +1,13 @@
Count Name
======= ====
- 913 Thomas Leitner <[email protected]>
+ 932 Thomas Leitner <[email protected]>
+ 18 Ashwin Maroli <[email protected]>
7 Christian Cornelssen <[email protected]>
6 Gioele Barabucci <[email protected]>
+ 5 Gleb Mazovetskiy <[email protected]>
4 Ted Pak <[email protected]>
4 Shuanglei Tao <[email protected]>
- 4 Gleb Mazovetskiy <[email protected]>
4 Dan Allen <[email protected]>
- 4 Ashwin Maroli <[email protected]>
4 Arne Brasseur <[email protected]>
3 Henning Perl <[email protected]>
3 gettalong <[email protected]>
@@ -26,12 +26,15 @@
1 utenmiki <[email protected]>
1 Trevor Wennblom <[email protected]>
1 tomykaira <[email protected]>
+ 1 tom93 <[email protected]>
1 Tim Blair <[email protected]>
1 Tim Besard <[email protected]>
1 Tim Bates <[email protected]>
1 Sun Yaozhu <[email protected]>
+ 1 Stephen <[email protected]>
1 Stephen Crosby <[email protected]>
1 Simon Lydell <[email protected]>
+ 1 Simon Coffey <[email protected]>
1 Shusaku NAKAZATO <[email protected]>
1 Sebastian Boehm <[email protected]>
1 scherr <[email protected]>
@@ -40,6 +43,7 @@
1 myqlarson <[email protected]>
1 milo.simpson <[email protected]>
1 Michal Till <[email protected]>
+ 1 Maxime Kjaer <[email protected]>
1 Matt Hickford <[email protected]>
1 Martyn Chamberlin <[email protected]>
1 Marek Tuchowski <[email protected]>
@@ -56,13 +60,17 @@
1 Hector Correa <[email protected]>
1 Florian Klampfer <[email protected]>
1 Floreal Morandat [email protected] <[email protected]>
+ 1 Fangyi Zhou <[email protected]>
1 Diego Galeota <[email protected]>
+ 1 David Rodríguez <[email protected]>
1 Damien Pollet <[email protected]>
1 Christopher Jefferson <[email protected]>
1 Cédric Boutillier <[email protected]>
+ 1 Bob Lail <[email protected]>
1 Ashe Connor <[email protected]>
1 Antoine Cotten <[email protected]>
1 Andrew <[email protected]>
1 Alpha Chen <[email protected]>
1 Alex Tomlins <[email protected]>
1 Alexey Vasiliev <[email protected]>
+ 1 284km <[email protected]>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/VERSION new/VERSION
--- old/VERSION 2019-01-31 20:20:09.000000000 +0100
+++ new/VERSION 2020-04-23 16:16:29.000000000 +0200
@@ -1 +1 @@
-2.1.0
+2.2.1
Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/converter/base.rb
new/lib/kramdown/converter/base.rb
--- old/lib/kramdown/converter/base.rb 2019-01-31 20:20:09.000000000 +0100
+++ new/lib/kramdown/converter/base.rb 2020-04-23 16:16:29.000000000 +0200
@@ -106,7 +106,8 @@
end
result = converter.convert(tree)
if result.respond_to?(:encode!) && result.encoding != Encoding::BINARY
- result.encode!(tree.options[:encoding])
+ result.encode!(tree.options[:encoding] ||
+ (raise ::Kramdown::Error, "Missing encoding option on
root element"))
end
if !converter.options[:template].empty? &&
converter.apply_template_after?
result = apply_template(converter, result)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/converter/html.rb
new/lib/kramdown/converter/html.rb
--- old/lib/kramdown/converter/html.rb 2019-01-31 20:20:09.000000000 +0100
+++ new/lib/kramdown/converter/html.rb 2020-04-23 16:16:29.000000000 +0200
@@ -46,6 +46,9 @@
@toc_code = nil
@indent = 2
@stack = []
+
+ # stash string representation of symbol to avoid allocations from
multiple interpolations.
+ @highlighter_class = " highlighter-#{options[:syntax_highlighter]}"
end
# The mapping of element type to conversion method.
@@ -78,7 +81,8 @@
end
def convert_text(el, _indent)
- escape_html(el.value, :text)
+ escaped = escape_html(el.value, :text)
+ @options[:remove_line_breaks_for_cjk] ? fix_cjk_line_break(escaped) :
escaped
end
def convert_p(el, indent)
@@ -88,7 +92,7 @@
el.children.first.options[:ial]&.[](:refs)&.include?('standalone')
convert_standalone_image(el.children.first, indent)
else
- format_as_block_html(el.type, el.attr, inner(el, indent), indent)
+ format_as_block_html("p", el.attr, inner(el, indent), indent)
end
end
@@ -135,7 +139,7 @@
end
def convert_blockquote(el, indent)
- format_as_indented_block_html(el.type, el.attr, inner(el, indent),
indent)
+ format_as_indented_block_html("blockquote", el.attr, inner(el,
indent), indent)
end
def convert_header(el, indent)
@@ -152,12 +156,15 @@
"#{' ' * indent}<hr#{html_attributes(el.attr)} />\n"
end
+ ZERO_TO_ONETWENTYEIGHT = (0..128).to_a.freeze
+ private_constant :ZERO_TO_ONETWENTYEIGHT
+
def convert_ul(el, indent)
if !@toc_code && (el.options[:ial][:refs].include?('toc') rescue nil)
- @toc_code = [el.type, el.attr, (0..128).to_a.map { rand(36).to_s(36)
}.join]
+ @toc_code = [el.type, el.attr, ZERO_TO_ONETWENTYEIGHT.map {
rand(36).to_s(36) }.join]
@toc_code.last
elsif !@footnote_location && el.options[:ial] &&
(el.options[:ial][:refs] || []).include?('footnotes')
- @footnote_location = (0..128).to_a.map { rand(36).to_s(36) }.join
+ @footnote_location = ZERO_TO_ONETWENTYEIGHT.map { rand(36).to_s(36)
}.join
else
format_as_indented_block_html(el.type, el.attr, inner(el, indent),
indent)
end
@@ -165,7 +172,7 @@
alias convert_ol convert_ul
def convert_dl(el, indent)
- format_as_indented_block_html(el.type, el.attr, inner(el, indent),
indent)
+ format_as_indented_block_html("dl", el.attr, inner(el, indent), indent)
end
def convert_li(el, indent)
@@ -188,7 +195,7 @@
break
end
end if !attr['id'] && @stack.last.options[:ial] &&
@stack.last.options[:ial][:refs]
- format_as_block_html(el.type, attr, inner(el, indent), indent)
+ format_as_block_html("dt", attr, inner(el, indent), indent)
end
def convert_html_element(el, indent)
@@ -263,7 +270,7 @@
end
def convert_a(el, indent)
- format_as_span_html(el.type, el.attr, inner(el, indent))
+ format_as_span_html("a", el.attr, inner(el, indent))
end
def convert_img(el, _indent)
@@ -296,7 +303,7 @@
@footnotes << [name, el.value, number, 0]
@footnotes_by_name[name] = @footnotes.last
end
- "<sup id=\"fnref:#{name}#{repeat}\">" \
+ "<sup id=\"fnref:#{name}#{repeat}\" role=\"doc-noteref\">" \
"<a href=\"#fn:#{name}\" class=\"footnote\">" \
"#{number}</a></sup>"
end
@@ -400,7 +407,7 @@
# Add the syntax highlighter name to the 'class' attribute of the given
attribute hash. And
# overwrites or add a "language-LANG" part using the +lang+ parameter if
+lang+ is not nil.
def add_syntax_highlighter_to_class_attr(attr, lang = nil)
- (attr['class'] = (attr['class'] || '') + "
highlighter-#{@options[:syntax_highlighter]}").lstrip!
+ (attr['class'] = (attr['class'] || '') + @highlighter_class).lstrip!
attr['class'].sub!(/\blanguage-\S+|(^)/) { "language-#{lang}#{$1 ? ' '
: ''}" } if lang
end
@@ -475,9 +482,9 @@
result
end
- FOOTNOTE_BACKLINK_FMT = "%s<a href=\"#fnref:%s\"
class=\"reversefootnote\">%s</a>"
+ FOOTNOTE_BACKLINK_FMT = "%s<a href=\"#fnref:%s\"
class=\"reversefootnote\" role=\"doc-backlink\">%s</a>"
- # Return a HTML ordered list with the footnote content for the used
footnotes.
+ # Return an HTML ordered list with the footnote content for the used
footnotes.
def footnote_content
ol = Element.new(:ol)
ol.attr['start'] = @footnote_start if @footnote_start != 1
@@ -485,7 +492,7 @@
backlink_text = escape_html(@options[:footnote_backlink], :text)
while i < @footnotes.length
name, data, _, repeat = *@footnotes[i]
- li = Element.new(:li, nil, 'id' => "fn:#{name}")
+ li = Element.new(:li, nil, 'id' => "fn:#{name}", 'role' =>
'doc-endnote')
li.children = Marshal.load(Marshal.dump(data.children))
para = nil
@@ -520,7 +527,7 @@
if ol.children.empty?
''
else
- format_as_indented_block_html('div', {class: "footnotes"},
convert(ol, 2), 0)
+ format_as_indented_block_html('div', {class: "footnotes", role:
"doc-endnotes"}, convert(ol, 2), 0)
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/converter/kramdown.rb
new/lib/kramdown/converter/kramdown.rb
--- old/lib/kramdown/converter/kramdown.rb 2019-01-31 20:20:09.000000000
+0100
+++ new/lib/kramdown/converter/kramdown.rb 2020-04-23 16:16:29.000000000
+0200
@@ -34,13 +34,13 @@
res = res.dup if res.frozen?
if ![:html_element, :li, :dt, :dd, :td].include?(el.type) && (ial =
ial_for_element(el))
res << ial
- res << "\n\n" if Element.category(el) == :block
+ res << "\n\n" if el.block?
elsif [:ul, :dl, :ol, :codeblock].include?(el.type) && opts[:next] &&
([el.type, :codeblock].include?(opts[:next].type) ||
(opts[:next].type == :blank && opts[:nnext] &&
[el.type, :codeblock].include?(opts[:nnext].type)))
res << "^\n\n"
- elsif Element.category(el) == :block &&
+ elsif el.block? &&
![:li, :dd, :dt, :td, :th, :tr, :thead, :tbody, :tfoot,
:blank].include?(el.type) &&
(el.type != :html_element || @stack.last.type != :html_element) &&
(el.type != :p || !el.options[:transparent])
@@ -184,10 +184,15 @@
HTML_TAGS_WITH_BODY = ['div', 'script', 'iframe', 'textarea']
+ HTML_ELEMENT_TYPES = [:entity, :text, :html_element].freeze
+ private_constant :HTML_ELEMENT_TYPES
+
def convert_html_element(el, opts)
markdown_attr = el.options[:category] == :block && el.children.any? do
|c|
- c.type != :html_element && (c.type != :p ||
!c.options[:transparent]) &&
- Element.category(c) == :block
+ c.type != :html_element &&
+ (c.type != :p || !c.options[:transparent] ||
+ c.children.any? {|t| !HTML_ELEMENT_TYPES.member?(t.type) }) &&
+ c.block?
end
opts[:force_raw_text] = true if %w[script pre code].include?(el.value)
opts[:raw_text] = opts[:force_raw_text] || opts[:block_raw_text] || \
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/converter/math_engine/mathjax.rb
new/lib/kramdown/converter/math_engine/mathjax.rb
--- old/lib/kramdown/converter/math_engine/mathjax.rb 2019-01-31
20:20:09.000000000 +0100
+++ new/lib/kramdown/converter/math_engine/mathjax.rb 2020-04-23
16:16:29.000000000 +0200
@@ -16,40 +16,14 @@
module Mathjax
def self.call(converter, el, opts)
- type = el.options[:category]
- text = (el.value =~ /<|&/ ? "% <![CDATA[\n#{el.value} %]]>" :
el.value).dup
- text.gsub!(/<\/?script>?/, '')
-
- preview = preview_string(converter, el, opts).dup
-
- attr = {type: "math/tex#{type == :block ? '; mode=display' : ''}"}
- preview << if type == :block
- converter.format_as_block_html('script', attr, text,
opts[:indent])
- else
- converter.format_as_span_html('script', attr, text)
- end
- end
-
- def self.preview_string(converter, el, opts)
- preview = converter.options[:math_engine_opts][:preview]
- return '' unless preview
-
- preview = (preview == true ? converter.escape_html(el.value) :
preview.to_s)
-
- preview_as_code = converter.options[:math_engine_opts][:preview_as_code]
-
- if el.options[:category] == :block
- if preview_as_code
- converter.format_as_block_html('pre', {'class' => 'MathJax_Preview'},
- converter.format_as_span_html('code',
{}, preview),
- opts[:indent])
- else
- converter.format_as_block_html('div', {'class' =>
'MathJax_Preview'}, preview,
- opts[:indent])
- end
+ value = converter.escape_html(el.value)
+ result = el.options[:category] == :block ? "\\[#{value}\\]\n" :
"\\(#{value}\\)"
+ if el.attr.empty?
+ result
+ elsif el.options[:category] == :block
+ converter.format_as_block_html('div', el.attr, result, opts[:indent])
else
- converter.format_as_span_html(preview_as_code ? 'code' : 'span',
- {'class' => 'MathJax_Preview'}, preview)
+ converter.format_as_span_html('span', el.attr, "$#{el.value}$")
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/converter/syntax_highlighter.rb
new/lib/kramdown/converter/syntax_highlighter.rb
--- old/lib/kramdown/converter/syntax_highlighter.rb 2019-01-31
20:20:09.000000000 +0100
+++ new/lib/kramdown/converter/syntax_highlighter.rb 2020-04-23
16:16:29.000000000 +0200
@@ -42,7 +42,7 @@
#
# == Special Implementation Details
#
- # HTML converter:: If the syntax highlighter is used with a HTML
converter, it should return
+ # HTML converter:: If the syntax highlighter is used with an HTML
converter, it should return
# :block type text correctly wrapped (i.e. normally
inside a pre-tag, but may
# also be a table-tag or just a div-tag) but :span type
text *without* a
# code-tag!
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/element.rb new/lib/kramdown/element.rb
--- old/lib/kramdown/element.rb 2019-01-31 20:20:09.000000000 +0100
+++ new/lib/kramdown/element.rb 2020-04-23 16:16:29.000000000 +0200
@@ -522,6 +522,22 @@
CATEGORY[el.type] || el.options[:category]
end
+ # syntactic sugar to simplify calls such as
+Kramdown::Element.category(el) == :block+ with
+ # +el.block?+.
+ #
+ # Returns boolean true or false.
+ def block?
+ (CATEGORY[type] || options[:category]) == :block
+ end
+
+ # syntactic sugar to simplify calls such as
+Kramdown::Element.category(el) == :span+ with
+ # +el.span?+.
+ #
+ # Returns boolean true or false.
+ def span?
+ (CATEGORY[type] || options[:category]) == :span
+ end
+
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/options.rb new/lib/kramdown/options.rb
--- old/lib/kramdown/options.rb 2019-01-31 20:20:09.000000000 +0100
+++ new/lib/kramdown/options.rb 2020-04-23 16:16:29.000000000 +0200
@@ -328,7 +328,11 @@
Used by: HTML converter, kramdown converter
EOF
- define(:toc_levels, Object, (1..6).to_a, <<~EOF) do |val|
+ TOC_LEVELS_RANGE = (1..6).freeze
+ TOC_LEVELS_ARRAY = TOC_LEVELS_RANGE.to_a.freeze
+ private_constant :TOC_LEVELS_RANGE, :TOC_LEVELS_ARRAY
+
+ define(:toc_levels, Object, TOC_LEVELS_ARRAY, <<~EOF) do |val|
Defines the levels that are used for the table of contents
The individual levels can be specified by separating them with commas
@@ -347,12 +351,20 @@
else
raise Kramdown::Error, "Invalid syntax for option toc_levels"
end
- when Array, Range
- val = val.map(&:to_i).uniq
+ when Array
+ unless val.eql?(TOC_LEVELS_ARRAY)
+ val = val.map(&:to_i).uniq
+ end
+ when Range
+ if val.eql?(TOC_LEVELS_RANGE)
+ val = TOC_LEVELS_ARRAY
+ else
+ val = val.map(&:to_i).uniq
+ end
else
raise Kramdown::Error, "Invalid type #{val.class} for option
toc_levels"
end
- if val.any? {|i| !(1..6).cover?(i) }
+ if val.any? {|i| !TOC_LEVELS_RANGE.cover?(i) }
raise Kramdown::Error, "Level numbers for option toc_levels have to be
integers from 1 to 6"
end
val
@@ -377,7 +389,11 @@
simple_array_validator(val, :latex_headers, 6)
end
- define(:smart_quotes, Object, %w[lsquo rsquo ldquo rdquo], <<~EOF) do |val|
+ SMART_QUOTES_ENTITIES = %w[lsquo rsquo ldquo rdquo].freeze
+ SMART_QUOTES_STR = SMART_QUOTES_ENTITIES.join(',').freeze
+ private_constant :SMART_QUOTES_ENTITIES, :SMART_QUOTES_STR
+
+ define(:smart_quotes, Object, SMART_QUOTES_ENTITIES, <<~EOF) do |val|
Defines the HTML entity names or code points for smart quote output
The entities identified by entity name or code point that should be
@@ -388,9 +404,13 @@
Default: lsquo,rsquo,ldquo,rdquo
Used by: HTML/Latex converter
EOF
- val = simple_array_validator(val, :smart_quotes, 4)
- val.map! {|v| Integer(v) rescue v }
- val
+ if val == SMART_QUOTES_STR || val == SMART_QUOTES_ENTITIES
+ SMART_QUOTES_ENTITIES
+ else
+ val = simple_array_validator(val, :smart_quotes, 4)
+ val.map! {|v| Integer(v) rescue v }
+ val
+ end
end
define(:typographic_symbols, Object, {}, <<~EOF) do |val|
@@ -562,6 +582,13 @@
Used by: HTML
EOF
+ define(:remove_line_breaks_for_cjk, Boolean, false, <<~EOF)
+ Specifies whether line breaks should be removed between CJK characters
+
+ Default: false
+ Used by: HTML converter
+ EOF
+
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/parser/base.rb
new/lib/kramdown/parser/base.rb
--- old/lib/kramdown/parser/base.rb 2019-01-31 20:20:09.000000000 +0100
+++ new/lib/kramdown/parser/base.rb 2020-04-23 16:16:29.000000000 +0200
@@ -93,7 +93,9 @@
raise "The source text contains invalid characters for the used
encoding #{source.encoding}"
end
source = source.encode('UTF-8')
- source.gsub(/\r\n?/, "\n").chomp + "\n"
+ source.gsub!(/\r\n?/, "\n")
+ source.chomp!
+ source << "\n"
end
# This helper method adds the given +text+ either to the last element in
the +tree+ if it is a
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/parser/html.rb
new/lib/kramdown/parser/html.rb
--- old/lib/kramdown/parser/html.rb 2019-01-31 20:20:09.000000000 +0100
+++ new/lib/kramdown/parser/html.rb 2020-04-23 16:16:29.000000000 +0200
@@ -16,7 +16,7 @@
module Parser
- # Used for parsing a HTML document.
+ # Used for parsing an HTML document.
#
# The parsing code is in the Parser module that can also be used by other
parsers.
class Html < Base
@@ -286,7 +286,7 @@
src = Kramdown::Utils::StringScanner.new(raw)
result = []
until src.eos?
- if (tmp = src.scan_until(/(?=#{HTML_ENTITY_RE})/))
+ if (tmp = src.scan_until(/(?=#{HTML_ENTITY_RE})/o))
result << Element.new(:text, tmp)
src.scan(HTML_ENTITY_RE)
val = src[1] || (src[2]&.to_i) || src[3].hex
@@ -324,7 +324,7 @@
tmp = []
last_is_p = false
el.children.each do |c|
- if Element.category(c) != :block || c.type == :text
+ if !c.block? || c.type == :text
unless last_is_p
tmp << Element.new(:p, nil, nil, transparent: true)
last_is_p = true
@@ -354,8 +354,8 @@
el.children = el.children.reject do |c|
i += 1
c.type == :text && c.value.strip.empty? &&
- (i == 0 || i == el.children.length - 1 ||
(Element.category(el.children[i - 1]) == :block &&
-
Element.category(el.children[i + 1]) == :block))
+ (i == 0 || i == el.children.length - 1 || ((el.children[i -
1]).block? &&
+ (el.children[i +
1]).block?))
end
end
@@ -581,11 +581,11 @@
@src = Kramdown::Utils::StringScanner.new(adapt_source(source))
while true
- if (result = @src.scan(/\s*#{HTML_INSTRUCTION_RE}/))
+ if (result = @src.scan(/\s*#{HTML_INSTRUCTION_RE}/o))
@tree.children << Element.new(:xml_pi, result.strip, nil,
category: :block)
- elsif (result = @src.scan(/\s*#{HTML_DOCTYPE_RE}/))
+ elsif (result = @src.scan(/\s*#{HTML_DOCTYPE_RE}/o))
# ignore the doctype
- elsif (result = @src.scan(/\s*#{HTML_COMMENT_RE}/))
+ elsif (result = @src.scan(/\s*#{HTML_COMMENT_RE}/o))
@tree.children << Element.new(:xml_comment, result.strip, nil,
category: :block)
else
break
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/parser/kramdown/autolink.rb
new/lib/kramdown/parser/kramdown/autolink.rb
--- old/lib/kramdown/parser/kramdown/autolink.rb 2019-01-31
20:20:09.000000000 +0100
+++ new/lib/kramdown/parser/kramdown/autolink.rb 2020-04-23
16:16:29.000000000 +0200
@@ -11,8 +11,8 @@
module Parser
class Kramdown
- ACHARS = '[[:alnum:]]_'
- AUTOLINK_START_STR =
"<((mailto|https?|ftps?):.+?|[-.#{ACHARS}]+@[-#{ACHARS}]+(?:\.[-#{ACHARS}]+)*\.[a-z]+)>"
+ ACHARS = '[[:alnum:]]-_.'
+ AUTOLINK_START_STR =
"<((mailto|https?|ftps?):.+?|[#{ACHARS}]+?@[#{ACHARS}]+?)>"
AUTOLINK_START = /#{AUTOLINK_START_STR}/u
# Parse the autolink at the current location.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/parser/kramdown/codespan.rb
new/lib/kramdown/parser/kramdown/codespan.rb
--- old/lib/kramdown/parser/kramdown/codespan.rb 2019-01-31
20:20:09.000000000 +0100
+++ new/lib/kramdown/parser/kramdown/codespan.rb 2020-04-23
16:16:29.000000000 +0200
@@ -25,8 +25,18 @@
return
end
- if (text = @src.scan_until(/#{result}/))
- text.sub!(/#{result}\Z/, '')
+ # assign static regex to avoid allocating the same on every instance
+ # where +result+ equals a single-backtick. Interpolate otherwise.
+ if result == '`'
+ scan_pattern = /`/
+ str_sub_pattern = /`\Z/
+ else
+ scan_pattern = /#{result}/
+ str_sub_pattern = /#{result}\Z/
+ end
+
+ if (text = @src.scan_until(scan_pattern))
+ text.sub!(str_sub_pattern, '')
unless simple
text = text[1..-1] if text[0..0] == ' '
text = text[0..-2] if text[-1..-1] == ' '
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/parser/kramdown/emphasis.rb
new/lib/kramdown/parser/kramdown/emphasis.rb
--- old/lib/kramdown/parser/kramdown/emphasis.rb 2019-01-31
20:20:09.000000000 +0100
+++ new/lib/kramdown/parser/kramdown/emphasis.rb 2020-04-23
16:16:29.000000000 +0200
@@ -22,7 +22,7 @@
element = (result.length == 2 ? :strong : :em)
type = result[0..0]
- if (type == '_' && @src.pre_match =~ /[[:alpha:]-]\z/) ||
@src.check(/\s/) ||
+ if (type == '_' && @src.pre_match =~ /[[:alpha:]]-?[[:alpha:]]*\z/) ||
@src.check(/\s/) ||
@tree.type == element || @stack.any? {|el, _| el.type == element }
add_text(result)
return
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/parser/kramdown/header.rb
new/lib/kramdown/parser/kramdown/header.rb
--- old/lib/kramdown/parser/kramdown/header.rb 2019-01-31 20:20:09.000000000
+0100
+++ new/lib/kramdown/parser/kramdown/header.rb 2020-04-23 16:16:29.000000000
+0200
@@ -31,7 +31,7 @@
def parse_atx_header
return false unless after_block_boundary?
text, id = parse_header_contents
- text.sub!(/[\t ]#+\z/, '') && text.rstrip!
+ text.sub!(/(?<!\\)#+\z/, '') && text.rstrip!
return false if text.empty?
add_header(@src["level"].length, text, id)
true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/parser/kramdown/html.rb
new/lib/kramdown/parser/kramdown/html.rb
--- old/lib/kramdown/parser/kramdown/html.rb 2019-01-31 20:20:09.000000000
+0100
+++ new/lib/kramdown/parser/kramdown/html.rb 2020-04-23 16:16:29.000000000
+0200
@@ -79,12 +79,12 @@
@src.scan(TRAILING_WHITESPACE)
true
else
- if @src.check(/^#{OPT_SPACE}#{HTML_TAG_RE}/) &&
!HTML_SPAN_ELEMENTS.include?(@src[1].downcase)
+ if @src.check(/^#{OPT_SPACE}#{HTML_TAG_RE}/o) &&
!HTML_SPAN_ELEMENTS.include?(@src[1].downcase)
@src.pos += @src.matched_size
handle_html_start_tag(line, &method(:handle_kramdown_html_tag))
Kramdown::Parser::Html::ElementConverter.convert(@root,
@tree.children.last) if @options[:html_to_native]
true
- elsif @src.check(/^#{OPT_SPACE}#{HTML_TAG_CLOSE_RE}/) &&
!HTML_SPAN_ELEMENTS.include?(@src[1].downcase)
+ elsif @src.check(/^#{OPT_SPACE}#{HTML_TAG_CLOSE_RE}/o) &&
!HTML_SPAN_ELEMENTS.include?(@src[1].downcase)
name = @src[1].downcase
if @tree.type == :html_element && @tree.value == name
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/parser/kramdown/list.rb
new/lib/kramdown/parser/kramdown/list.rb
--- old/lib/kramdown/parser/kramdown/list.rb 2019-01-31 20:20:09.000000000
+0100
+++ new/lib/kramdown/parser/kramdown/list.rb 2020-04-23 16:16:29.000000000
+0200
@@ -44,8 +44,10 @@
[content, indentation,
*PARSE_FIRST_LIST_LINE_REGEXP_CACHE[indentation]]
end
- LIST_START_UL = /^(#{OPT_SPACE}[+*-])([\t| ].*?\n)/
- LIST_START_OL = /^(#{OPT_SPACE}\d+\.)([\t| ].*?\n)/
+ PATTERN_TAIL = /[\t| ].*?\n/
+
+ LIST_START_UL = /^(#{OPT_SPACE}[+*-])(#{PATTERN_TAIL})/
+ LIST_START_OL = /^(#{OPT_SPACE}\d+\.)(#{PATTERN_TAIL})/
LIST_START = /#{LIST_START_UL}|#{LIST_START_OL}/
# Parse the ordered or unordered list at the current location.
@@ -77,11 +79,7 @@
''
end
- list_start_re = if type == :ul
- /^( {0,#{[3, indentation - 1].min}}[+*-])([\t|
].*?\n)/
- else
- /^( {0,#{[3, indentation - 1].min}}\d+\.)([\t|
].*?\n)/
- end
+ list_start_re = fetch_pattern(type, indentation)
nested_list_found = (item.value =~ LIST_START)
last_is_blank = false
item.value = [item.value]
@@ -148,7 +146,7 @@
end
define_parser(:list, LIST_START)
- DEFINITION_LIST_START = /^(#{OPT_SPACE}:)([\t| ].*?\n)/
+ DEFINITION_LIST_START = /^(#{OPT_SPACE}:)(#{PATTERN_TAIL})/
# Parse the ordered or unordered list at the current location.
def parse_definition_list
@@ -198,7 +196,7 @@
''
end
- def_start_re = /^( {0,#{[3, indentation - 1].min}}:)([\t| ].*?\n)/
+ def_start_re = fetch_pattern(:dl, indentation)
first_as_para = false
last_is_blank = false
elsif @src.check(EOB_MARKER)
@@ -252,6 +250,35 @@
end
define_parser(:definition_list, DEFINITION_LIST_START)
+ private
+
+ # precomputed patterns for indentations 1..4 and fallback expression
+ # to compute pattern when indentation is outside the 1..4 range.
+ def fetch_pattern(type, indentation)
+ if type == :ul
+ case indentation
+ when 1 then %r/^( {0}[+*-])(#{PATTERN_TAIL})/o
+ when 2 then %r/^( {0,1}[+*-])(#{PATTERN_TAIL})/o
+ when 3 then %r/^( {0,2}[+*-])(#{PATTERN_TAIL})/o
+ else %r/^( {0,3}[+*-])(#{PATTERN_TAIL})/o
+ end
+ elsif type == :ol
+ case indentation
+ when 1 then %r/^( {0}\d+\.)(#{PATTERN_TAIL})/o
+ when 2 then %r/^( {0,1}\d+\.)(#{PATTERN_TAIL})/o
+ when 3 then %r/^( {0,2}\d+\.)(#{PATTERN_TAIL})/o
+ else %r/^( {0,3}\d+\.)(#{PATTERN_TAIL})/o
+ end
+ elsif type == :dl
+ case indentation
+ when 1 then %r/^( {0}:)(#{PATTERN_TAIL})/o
+ when 2 then %r/^( {0,1}:)(#{PATTERN_TAIL})/o
+ when 3 then %r/^( {0,2}:)(#{PATTERN_TAIL})/o
+ else %r/^( {0,3}:)(#{PATTERN_TAIL})/o
+ end
+ end
+ end
+
end
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/parser/kramdown/math.rb
new/lib/kramdown/parser/kramdown/math.rb
--- old/lib/kramdown/parser/kramdown/math.rb 2019-01-31 20:20:09.000000000
+0100
+++ new/lib/kramdown/parser/kramdown/math.rb 2020-04-23 16:16:29.000000000
+0200
@@ -21,7 +21,7 @@
if !after_block_boundary?
return false
elsif @src[1]
- @src.scan(/^#{OPT_SPACE}\\/) if @src[3]
+ @src.scan(/^#{OPT_SPACE}\\/o) if @src[3]
return false
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/parser/kramdown/table.rb
new/lib/kramdown/parser/kramdown/table.rb
--- old/lib/kramdown/parser/kramdown/table.rb 2019-01-31 20:20:09.000000000
+0100
+++ new/lib/kramdown/parser/kramdown/table.rb 2020-04-23 16:16:29.000000000
+0200
@@ -132,8 +132,8 @@
pipe_on_line = false
end
else
- break if lines.size > 1 && !pipe_on_line && lines.first !~
/^#{TABLE_PIPE_CHECK}/
- pipe_on_line = (lines.size > 1 ? false : pipe_on_line) ||
(lines.last =~ /^#{TABLE_PIPE_CHECK}/)
+ break if lines.size > 1 && !pipe_on_line && lines.first !~
/^#{TABLE_PIPE_CHECK}/o
+ pipe_on_line = (lines.size > 1 ? false : pipe_on_line) ||
(lines.last =~ /^#{TABLE_PIPE_CHECK}/o)
end
end
@src.revert_pos(saved_pos) and return false unless pipe_on_line
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/parser/kramdown.rb
new/lib/kramdown/parser/kramdown.rb
--- old/lib/kramdown/parser/kramdown.rb 2019-01-31 20:20:09.000000000 +0100
+++ new/lib/kramdown/parser/kramdown.rb 2020-04-23 16:16:29.000000000 +0200
@@ -79,6 +79,8 @@
@span_parsers = [:emphasis, :codespan, :autolink, :span_html,
:footnote_marker, :link,
:smart_quotes, :inline_math, :span_extensions,
:html_entity,
:typographic_syms, :line_break, :escaped_chars]
+
+ @span_pattern_cache ||= Hash.new { |h, k| h[k] = {} }
end
private_class_method(:new, :allocate)
@@ -195,6 +197,11 @@
end.flatten!
end
+ def span_pattern_cache(stop_re, span_start)
+ @span_pattern_cache[stop_re][span_start] ||=
/(?=#{Regexp.union(stop_re, span_start)})/
+ end
+ private :span_pattern_cache
+
# Parse all span-level elements in the source string of @src into +el+.
#
# If the parameter +stop_re+ (a regexp) is used, parsing is immediately
stopped if the regexp
@@ -213,7 +220,7 @@
span_start, span_start_re = span_parser_regexps(parsers) if parsers
parsers ||= @span_parsers
- used_re = (stop_re.nil? ? span_start_re : /(?=#{Regexp.union(stop_re,
span_start)})/)
+ used_re = (stop_re.nil? ? span_start_re : span_pattern_cache(stop_re,
span_start))
stop_re_found = false
while [email protected]? && !stop_re_found
if (result = @src.scan_until(used_re))
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/utils/html.rb
new/lib/kramdown/utils/html.rb
--- old/lib/kramdown/utils/html.rb 2019-01-31 20:20:09.000000000 +0100
+++ new/lib/kramdown/utils/html.rb 2020-04-23 16:16:29.000000000 +0200
@@ -68,6 +68,13 @@
str.gsub(ESCAPE_RE_FROM_TYPE[type]) {|m| ESCAPE_MAP[m] || m }
end
+ REDUNDANT_LINE_BREAK_REGEX =
/([\p{Han}\p{Hiragana}\p{Katakana}]+)\n([\p{Han}\p{Hiragana}\p{Katakana}]+)/u
+ def fix_cjk_line_break(str)
+ while str.gsub!(REDUNDANT_LINE_BREAK_REGEX, '\1\2')
+ end
+ str
+ end
+
end
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/lib/kramdown/version.rb new/lib/kramdown/version.rb
--- old/lib/kramdown/version.rb 2019-01-31 20:20:09.000000000 +0100
+++ new/lib/kramdown/version.rb 2020-04-23 16:16:29.000000000 +0200
@@ -10,6 +10,6 @@
module Kramdown
# The kramdown version.
- VERSION = '2.1.0'
+ VERSION = '2.2.1'
end
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/man/man1/kramdown.1 new/man/man1/kramdown.1
--- old/man/man1/kramdown.1 2019-01-31 20:20:09.000000000 +0100
+++ new/man/man1/kramdown.1 2020-04-23 16:16:29.000000000 +0200
@@ -214,6 +214,13 @@
Default: true Used by: RemoveHtmlTags converter
.RE
.TP
+\fB\-\-[no\-]remove\-line\-breaks\-for\-cjk\fP
+Specifies whether line breaks should be removed between CJK characters
+.RS
+.P
+Default: false Used by: HTML converter
+.RE
+.TP
\fB\-\-[no\-]remove\-span\-html\-tags\fP
Remove span HTML tags
.RS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2019-01-31 20:20:09.000000000 +0100
+++ new/metadata 2020-04-23 16:16:29.000000000 +0200
@@ -1,16 +1,30 @@
--- !ruby/object:Gem::Specification
name: kramdown
version: !ruby/object:Gem::Version
- version: 2.1.0
+ version: 2.2.1
platform: ruby
authors:
- Thomas Leitner
autorequire:
bindir: bin
cert_chain: []
-date: 2019-01-31 00:00:00.000000000 Z
+date: 2020-04-23 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
+ name: rexml
+ requirement: !ruby/object:Gem::Requirement
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ version: '0'
+ type: :runtime
+ prerelease: false
+ version_requirements: !ruby/object:Gem::Requirement
+ requirements:
+ - - ">="
+ - !ruby/object:Gem::Version
+ version: '0'
+- !ruby/object:Gem::Dependency
name: minitest
requirement: !ruby/object:Gem::Requirement
requirements:
@@ -350,6 +364,8 @@
- test/testcases/block/09_html/simple.html
- test/testcases/block/09_html/simple.options
- test/testcases/block/09_html/simple.text
+- test/testcases/block/09_html/standalone_image_in_div.htmlinput
+- test/testcases/block/09_html/standalone_image_in_div.text
- test/testcases/block/09_html/textarea.html
- test/testcases/block/09_html/textarea.text
- test/testcases/block/09_html/xml.html
@@ -421,15 +437,6 @@
- test/testcases/block/14_table/table_with_footnote.text
- test/testcases/block/15_math/gh_128.html
- test/testcases/block/15_math/gh_128.text
-- test/testcases/block/15_math/mathjax_preview.html
-- test/testcases/block/15_math/mathjax_preview.options
-- test/testcases/block/15_math/mathjax_preview.text
-- test/testcases/block/15_math/mathjax_preview_as_code.html
-- test/testcases/block/15_math/mathjax_preview_as_code.options
-- test/testcases/block/15_math/mathjax_preview_as_code.text
-- test/testcases/block/15_math/mathjax_preview_simple.html
-- test/testcases/block/15_math/mathjax_preview_simple.options
-- test/testcases/block/15_math/mathjax_preview_simple.text
- test/testcases/block/15_math/no_engine.html
- test/testcases/block/15_math/no_engine.options
- test/testcases/block/15_math/no_engine.text
@@ -449,6 +456,9 @@
- test/testcases/block/16_toc/toc_with_links.html
- test/testcases/block/16_toc/toc_with_links.options
- test/testcases/block/16_toc/toc_with_links.text
+- test/testcases/cjk-line-break.html
+- test/testcases/cjk-line-break.options
+- test/testcases/cjk-line-break.text
- test/testcases/encoding.html
- test/testcases/encoding.text
- test/testcases/man/example.man
@@ -641,8 +651,7 @@
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubyforge_project:
-rubygems_version: 2.7.3
+rubygems_version: 3.0.3
signing_key:
specification_version: 4
summary: kramdown is a fast, pure-Ruby Markdown-superset converter.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/test_files.rb new/test/test_files.rb
--- old/test/test_files.rb 2019-01-31 20:20:09.000000000 +0100
+++ new/test/test_files.rb 2020-04-23 16:16:29.000000000 +0200
@@ -11,6 +11,7 @@
require 'kramdown'
require 'yaml'
require 'tmpdir'
+require 'open3'
begin
require 'kramdown/converter/syntax_highlighter/rouge'
@@ -111,14 +112,10 @@
end
def tidy_output(out)
- cmd = "tidy -q --doctype omit #{RUBY_VERSION >= '1.9' ? '-utf8' : '-raw'}
2>/dev/null"
- result = IO.popen(cmd, 'r+') do |io|
- io.write(out)
- io.close_write
- io.read
- end
- if $?.exitstatus == 2
- raise "Problem using tidy"
+ cmd = "tidy -q --doctype omit -utf8"
+ result, error, status = Open3.capture3(cmd, stdin_data: out)
+ if status.exitstatus == 2
+ raise "Problem using tidy: #{error}"
end
result
end
@@ -136,6 +133,7 @@
'test/testcases/block/06_codeblock/with_lang_in_fenced_block_name_with_dash.text',
'test/testcases/block/06_codeblock/with_lang_in_fenced_block_any_char.text',
'test/testcases/block/03_paragraph/standalone_image.text', # bc of
standalone image
+ 'test/testcases/cjk-line-break.text', # latex unicode support
].compact
Dir[File.dirname(__FILE__) + '/testcases/**/*.text'].each do |text_file|
next if EXCLUDE_LATEX_FILES.any? {|f| text_file =~ /#{f}$/ }
@@ -180,6 +178,8 @@
'test/testcases/block/09_html/xml.text', # bc of tidy
'test/testcases/span/05_html/xml.text', # bc of tidy
'test/testcases/block/03_paragraph/standalone_image.text', # bc of
standalone image
+ 'test/testcases/cjk-line-break.text',
+ 'test/testcases/block/09_html/standalone_image_in_div.html', # bc of
standalone image
].compact
Dir[File.dirname(__FILE__) + '/testcases/**/*.text'].each do |text_file|
next if EXCLUDE_TEXT_FILES.any? {|f| text_file =~ /#{f}$/ }
@@ -222,14 +222,15 @@
'test/testcases/block/16_toc/toc_exclude.html', # bc of different
attribute ordering
'test/testcases/span/autolinks/url_links.html', # bc of quot entity
being converted to char
'test/testcases/block/14_table/empty_tag_in_cell.html', # bc of tidy
- 'test/testcases/block/15_math/mathjax_preview.html', # bc of mathjax
preview
- 'test/testcases/block/15_math/mathjax_preview_simple.html', # bc of
mathjax preview
- 'test/testcases/block/15_math/mathjax_preview_as_code.html', # bc of
mathjax preview
'test/testcases/span/01_link/link_defs_with_ial.html', # bc of attribute
ordering
'test/testcases/span/05_html/mark_element.html', # bc of tidy
'test/testcases/block/09_html/xml.html', # bc of tidy
'test/testcases/span/05_html/xml.html', # bc of tidy
'test/testcases/block/03_paragraph/standalone_image.html', # bc of
standalone image
+ 'test/testcases/block/15_math/normal.html', # bc of mathjax and HTML
parser
+ 'test/testcases/block/15_math/gh_128.html', # bc of mathjax and HTML
parser
+ 'test/testcases/span/04_footnote/backlink_inline.html', # bc of mathjax
+ 'test/testcases/block/09_html/standalone_image_in_div.html', # bc of
standalone image
].compact
Dir[File.dirname(__FILE__) + '/testcases/**/*.html'].each do |html_file|
next if EXCLUDE_HTML_KD_FILES.any? {|f| html_file =~ /#{f}$/ }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/block/04_header/atx_header.html
new/test/testcases/block/04_header/atx_header.html
--- old/test/testcases/block/04_header/atx_header.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/block/04_header/atx_header.html 2020-04-23
16:16:29.000000000 +0200
@@ -26,6 +26,12 @@
### not a header</p>
</blockquote>
+<h1>header</h1>
+
+<h1>header</h1>
+
+<h1>header</h1>
+
<h1>header #</h1>
<h1>header</h1>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/block/04_header/atx_header.text
new/test/testcases/block/04_header/atx_header.text
--- old/test/testcases/block/04_header/atx_header.text 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/block/04_header/atx_header.text 2020-04-23
16:16:29.000000000 +0200
@@ -23,6 +23,12 @@
> blockquote
### not a header
+# header #
+
+# header#
+
+#header#
+
# header \#
# header
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/test/testcases/block/09_html/standalone_image_in_div.htmlinput
new/test/testcases/block/09_html/standalone_image_in_div.htmlinput
--- old/test/testcases/block/09_html/standalone_image_in_div.htmlinput
1970-01-01 01:00:00.000000000 +0100
+++ new/test/testcases/block/09_html/standalone_image_in_div.htmlinput
2020-04-23 16:16:30.000000000 +0200
@@ -0,0 +1,7 @@
+<div class="example-1">
+ <img src="src.png" alt="inside" />
+</div>
+
+<div class="example-2">
+ <a href="website.html">text</a>
+</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/test/testcases/block/09_html/standalone_image_in_div.text
new/test/testcases/block/09_html/standalone_image_in_div.text
--- old/test/testcases/block/09_html/standalone_image_in_div.text
1970-01-01 01:00:00.000000000 +0100
+++ new/test/testcases/block/09_html/standalone_image_in_div.text
2020-04-23 16:16:30.000000000 +0200
@@ -0,0 +1,8 @@
+<div class="example-1" markdown="1">
+
+</div>
+
+<div class="example-2" markdown="1">
+[text](website.html)
+</div>
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/block/12_extension/options.html
new/test/testcases/block/12_extension/options.html
--- old/test/testcases/block/12_extension/options.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/block/12_extension/options.html 2020-04-23
16:16:30.000000000 +0200
@@ -10,12 +10,12 @@
<p>some <span><em>para</em></span></p>
</div>
-<p>Some text<sup id="fnref:ab"><a href="#fn:ab"
class="footnote">10</a></sup>.</p>
+<p>Some text<sup id="fnref:ab" role="doc-noteref"><a href="#fn:ab"
class="footnote">10</a></sup>.</p>
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol start="10">
- <li id="fn:ab">
- <p>Some text. <a href="#fnref:ab" class="reversefootnote">↩</a></p>
+ <li id="fn:ab" role="doc-endnote">
+ <p>Some text. <a href="#fnref:ab" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
</ol>
</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/block/12_extension/options2.html
new/test/testcases/block/12_extension/options2.html
--- old/test/testcases/block/12_extension/options2.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/block/12_extension/options2.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,10 +1,10 @@
-<p>Some text<sup id="fnref:ab"><a href="#fn:ab"
class="footnote">1</a></sup>.</p>
+<p>Some text<sup id="fnref:ab" role="doc-noteref"><a href="#fn:ab"
class="footnote">1</a></sup>.</p>
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol>
- <li id="fn:ab">
- <p>Some text. <a href="#fnref:ab" class="reversefootnote">↩</a></p>
+ <li id="fn:ab" role="doc-endnote">
+ <p>Some text. <a href="#fnref:ab" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
</ol>
</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/test/testcases/block/14_table/table_with_footnote.html
new/test/testcases/block/14_table/table_with_footnote.html
--- old/test/testcases/block/14_table/table_with_footnote.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/block/14_table/table_with_footnote.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,7 +1,7 @@
<table>
<tbody>
<tr>
- <td>this is <sup id="fnref:1"><a href="#fn:1"
class="footnote">1</a></sup></td>
+ <td>this is <sup id="fnref:1" role="doc-noteref"><a href="#fn:1"
class="footnote">1</a></sup></td>
<td>a table</td>
</tr>
<tr>
@@ -11,15 +11,15 @@
</tbody>
</table>
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol>
- <li id="fn:1">
+ <li id="fn:1" role="doc-endnote">
<p>Something</p>
<blockquote>
<p>special here</p>
</blockquote>
- <p><a href="#fnref:1" class="reversefootnote">↩</a></p>
+ <p><a href="#fnref:1" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
</ol>
</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/block/15_math/gh_128.html
new/test/testcases/block/15_math/gh_128.html
--- old/test/testcases/block/15_math/gh_128.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/block/15_math/gh_128.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,2 +1 @@
-<script type="math/tex; mode=display">% <![CDATA[
-alert('a') alert('b<') %]]></script>
+\[<script>alert('a')</script>
<script>alert('b<')</script>\]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/block/15_math/mathjax_preview.html
new/test/testcases/block/15_math/mathjax_preview.html
--- old/test/testcases/block/15_math/mathjax_preview.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/block/15_math/mathjax_preview.html 1970-01-01
01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-<p>This is a <span class="MathJax_Preview">5 + 5</span><script
type="math/tex">5 + 5</script> statement</p>
-
-<div class="MathJax_Preview">5 + 5</div>
-<script type="math/tex; mode=display">5 + 5</script>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/block/15_math/mathjax_preview.options
new/test/testcases/block/15_math/mathjax_preview.options
--- old/test/testcases/block/15_math/mathjax_preview.options 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/block/15_math/mathjax_preview.options 1970-01-01
01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-:math_engine_opts:
- :preview: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/block/15_math/mathjax_preview.text
new/test/testcases/block/15_math/mathjax_preview.text
--- old/test/testcases/block/15_math/mathjax_preview.text 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/block/15_math/mathjax_preview.text 1970-01-01
01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-This is a $$5 + 5$$ statement
-
-$$
-5 + 5
-$$
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/test/testcases/block/15_math/mathjax_preview_as_code.html
new/test/testcases/block/15_math/mathjax_preview_as_code.html
--- old/test/testcases/block/15_math/mathjax_preview_as_code.html
2019-01-31 20:20:09.000000000 +0100
+++ new/test/testcases/block/15_math/mathjax_preview_as_code.html
1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-<p>This is a <code class="MathJax_Preview">5 + 5</code><script
type="math/tex">5 + 5</script> statement</p>
-
-<pre class="MathJax_Preview"><code>5 + 5</code></pre>
-<script type="math/tex; mode=display">5 + 5</script>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/test/testcases/block/15_math/mathjax_preview_as_code.options
new/test/testcases/block/15_math/mathjax_preview_as_code.options
--- old/test/testcases/block/15_math/mathjax_preview_as_code.options
2019-01-31 20:20:09.000000000 +0100
+++ new/test/testcases/block/15_math/mathjax_preview_as_code.options
1970-01-01 01:00:00.000000000 +0100
@@ -1,3 +0,0 @@
-:math_engine_opts:
- :preview: true
- :preview_as_code: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/test/testcases/block/15_math/mathjax_preview_as_code.text
new/test/testcases/block/15_math/mathjax_preview_as_code.text
--- old/test/testcases/block/15_math/mathjax_preview_as_code.text
2019-01-31 20:20:09.000000000 +0100
+++ new/test/testcases/block/15_math/mathjax_preview_as_code.text
1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-This is a $$5 + 5$$ statement
-
-$$
-5 + 5
-$$
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/test/testcases/block/15_math/mathjax_preview_simple.html
new/test/testcases/block/15_math/mathjax_preview_simple.html
--- old/test/testcases/block/15_math/mathjax_preview_simple.html
2019-01-31 20:20:09.000000000 +0100
+++ new/test/testcases/block/15_math/mathjax_preview_simple.html
1970-01-01 01:00:00.000000000 +0100
@@ -1,4 +0,0 @@
-<p>This is a <span class="MathJax_Preview">math</span><script
type="math/tex">5 + 5</script> statement</p>
-
-<div class="MathJax_Preview">math</div>
-<script type="math/tex; mode=display">5 + 5</script>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/test/testcases/block/15_math/mathjax_preview_simple.options
new/test/testcases/block/15_math/mathjax_preview_simple.options
--- old/test/testcases/block/15_math/mathjax_preview_simple.options
2019-01-31 20:20:09.000000000 +0100
+++ new/test/testcases/block/15_math/mathjax_preview_simple.options
1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-:math_engine_opts:
- :preview: 'math'
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/test/testcases/block/15_math/mathjax_preview_simple.text
new/test/testcases/block/15_math/mathjax_preview_simple.text
--- old/test/testcases/block/15_math/mathjax_preview_simple.text
2019-01-31 20:20:09.000000000 +0100
+++ new/test/testcases/block/15_math/mathjax_preview_simple.text
1970-01-01 01:00:00.000000000 +0100
@@ -1,5 +0,0 @@
-This is a $$5 + 5$$ statement
-
-$$
-5 + 5
-$$
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/block/15_math/normal.html
new/test/testcases/block/15_math/normal.html
--- old/test/testcases/block/15_math/normal.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/block/15_math/normal.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,29 +1,30 @@
<p>This is a para.
-<script type="math/tex">\text{LaTeX} \lambda_5</script></p>
+\(\text{LaTeX} \lambda_5\)</p>
-<script type="math/tex; mode=display">\lambda_5 = \alpha + 4</script>
+\[\lambda_5 = \alpha + 4\]
-<p><script type="math/tex">\lambda_\alpha > 5</script>
+<p>\(\lambda_\alpha > 5\)
This is a para.</p>
-<script type="math/tex; mode=display">% <![CDATA[
-\begin{align*}
-&=5 \\
-&=6 \\
-\end{align*} %]]></script>
+\[\begin{align*}
+&=5 \\
+&=6 \\
+\end{align*}\]
-<script type="math/tex; mode=display">5+5</script>
+\[5+5\]
-<script type="math/tex; mode=display">5+5</script>
+\[5+5\]
-<script type="math/tex; mode=display">5+5</script>
+\[5+5\]
-<script type="math/tex; mode=display">5+5</script>
+\[5+5\]
<pre><code>$$5+5$$
</code></pre>
-<script type="math/tex; mode=display">5+5</script>
-<script type="math/tex; mode=display">5+5</script>
+<div class="cls">\[5+5\]
+</div>
+<div class="cls">\[5+5\]
+</div>
-<script type="math/tex; mode=display">|x| = 5</script>
+\[|x| = 5\]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/block/16_toc/toc_with_footnotes.html
new/test/testcases/block/16_toc/toc_with_footnotes.html
--- old/test/testcases/block/16_toc/toc_with_footnotes.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/block/16_toc/toc_with_footnotes.html 2020-04-23
16:16:30.000000000 +0200
@@ -2,12 +2,12 @@
<li><a href="#header1-level-1" id="markdown-toc-header1-level-1">Header
level 1</a></li>
</ul>
-<h1 id="header1-level-1">Header<sup id="fnref:1"><a href="#fn:1"
class="footnote">1</a></sup> level 1</h1>
+<h1 id="header1-level-1">Header<sup id="fnref:1" role="doc-noteref"><a
href="#fn:1" class="footnote">1</a></sup> level 1</h1>
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol>
- <li id="fn:1">
- <p>Some footnote content here <a href="#fnref:1"
class="reversefootnote">↩</a></p>
+ <li id="fn:1" role="doc-endnote">
+ <p>Some footnote content here <a href="#fnref:1" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
</ol>
</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/cjk-line-break.html
new/test/testcases/cjk-line-break.html
--- old/test/testcases/cjk-line-break.html 1970-01-01 01:00:00.000000000
+0100
+++ new/test/testcases/cjk-line-break.html 2020-04-23 16:16:30.000000000
+0200
@@ -0,0 +1,4 @@
+<p>一二三四五</p>
+
+<p>あいうえお</p>
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/cjk-line-break.options
new/test/testcases/cjk-line-break.options
--- old/test/testcases/cjk-line-break.options 1970-01-01 01:00:00.000000000
+0100
+++ new/test/testcases/cjk-line-break.options 2020-04-23 16:16:30.000000000
+0200
@@ -0,0 +1 @@
+:remove_line_breaks_for_cjk: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/cjk-line-break.text
new/test/testcases/cjk-line-break.text
--- old/test/testcases/cjk-line-break.text 1970-01-01 01:00:00.000000000
+0100
+++ new/test/testcases/cjk-line-break.text 2020-04-23 16:16:30.000000000
+0200
@@ -0,0 +1,12 @@
+一
+二
+三
+四
+五
+
+あ
+い
+う
+え
+お
+
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/span/02_emphasis/normal.html
new/test/testcases/span/02_emphasis/normal.html
--- old/test/testcases/span/02_emphasis/normal.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/span/02_emphasis/normal.html 2020-04-23
16:16:30.000000000 +0200
@@ -59,3 +59,7 @@
<li>`<em>test</em>’</li>
<li>„<em>test</em>“</li>
</ul>
+
+<p>it–by design–<em>cannot have side-effects</em>.</p>
+
+<p>it—by design—<em>cannot have side-effects</em>.</p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/span/02_emphasis/normal.text
new/test/testcases/span/02_emphasis/normal.text
--- old/test/testcases/span/02_emphasis/normal.text 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/span/02_emphasis/normal.text 2020-04-23
16:16:30.000000000 +0200
@@ -57,3 +57,7 @@
- “_test_”
- \`_test_'
- „_test_“
+
+it--by design--_cannot have side-effects_.
+
+it---by design---_cannot have side-effects_.
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/span/04_footnote/backlink_inline.html
new/test/testcases/span/04_footnote/backlink_inline.html
--- old/test/testcases/span/04_footnote/backlink_inline.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/span/04_footnote/backlink_inline.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,30 +1,30 @@
-<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>
+<p>This is <sup id="fnref:paragraph" role="doc-noteref"><a
href="#fn:paragraph" class="footnote">1</a></sup><sup id="fnref:header"
role="doc-noteref"><a href="#fn:header" class="footnote">2</a></sup><sup
id="fnref:blockquote" role="doc-noteref"><a href="#fn:blockquote"
class="footnote">3</a></sup><sup id="fnref:codeblock" role="doc-noteref"><a
href="#fn:codeblock" class="footnote">4</a></sup><sup id="fnref:list"
role="doc-noteref"><a href="#fn:list" class="footnote">5</a></sup><sup
id="fnref:table" role="doc-noteref"><a href="#fn:table"
class="footnote">6</a></sup><sup id="fnref:hrule" role="doc-noteref"><a
href="#fn:hrule" class="footnote">7</a></sup><sup id="fnref:mathblock"
role="doc-noteref"><a href="#fn:mathblock" class="footnote">8</a></sup><sup
id="fnref:html" role="doc-noteref"><a href="#fn:html"
class="footnote">9</a></sup></p>
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol>
- <li id="fn:paragraph">
+ <li id="fn:paragraph" role="doc-endnote">
- <p>A paragraph <a href="#fnref:paragraph"
class="reversefootnote">↩</a></p>
+ <p>A paragraph <a href="#fnref:paragraph" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
- <li id="fn:header">
+ <li id="fn:header" role="doc-endnote">
- <h1 id="a-header">A header <a href="#fnref:header"
class="reversefootnote">↩</a></h1>
+ <h1 id="a-header">A header <a href="#fnref:header"
class="reversefootnote" role="doc-backlink">↩</a></h1>
</li>
- <li id="fn:blockquote">
+ <li id="fn:blockquote" role="doc-endnote">
<blockquote>
<p>blockquote</p>
- <p>paragraph <a href="#fnref:blockquote"
class="reversefootnote">↩</a></p>
+ <p>paragraph <a href="#fnref:blockquote" class="reversefootnote"
role="doc-backlink">↩</a></p>
</blockquote>
</li>
- <li id="fn:codeblock">
+ <li id="fn:codeblock" role="doc-endnote">
<pre><code>codeblock
</code></pre>
- <p><a href="#fnref:codeblock" class="reversefootnote">↩</a></p>
+ <p><a href="#fnref:codeblock" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
- <li id="fn:list">
+ <li id="fn:list" role="doc-endnote">
<ul>
<li>item 1</li>
@@ -36,14 +36,14 @@
<blockquote>
<p>blockquote</p>
- <h1 id="header">header <a href="#fnref:list"
class="reversefootnote">↩</a></h1>
+ <h1 id="header">header <a href="#fnref:list"
class="reversefootnote" role="doc-backlink">↩</a></h1>
</blockquote>
</li>
</ul>
</li>
</ul>
</li>
- <li id="fn:table">
+ <li id="fn:table" role="doc-endnote">
<table>
<tbody>
@@ -57,23 +57,23 @@
</tr>
</tbody>
</table>
- <p><a href="#fnref:table" class="reversefootnote">↩</a></p>
+ <p><a href="#fnref:table" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
- <li id="fn:hrule">
+ <li id="fn:hrule" role="doc-endnote">
<hr />
- <p><a href="#fnref:hrule" class="reversefootnote">↩</a></p>
+ <p><a href="#fnref:hrule" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
- <li id="fn:mathblock">
+ <li id="fn:mathblock" role="doc-endnote">
- <script type="math/tex; mode=display">x + 2</script>
- <p><a href="#fnref:mathblock" class="reversefootnote">↩</a></p>
+\[x + 2\]
+ <p><a href="#fnref:mathblock" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
- <li id="fn:html">
+ <li id="fn:html" role="doc-endnote">
<div>test
</div>
- <p><a href="#fnref:html" class="reversefootnote">↩</a></p>
+ <p><a href="#fnref:html" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
</ol>
</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/span/04_footnote/backlink_text.html
new/test/testcases/span/04_footnote/backlink_text.html
--- old/test/testcases/span/04_footnote/backlink_text.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/span/04_footnote/backlink_text.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,9 +1,9 @@
-<p>Some footnote here<sup id="fnref:fn"><a href="#fn:fn"
class="footnote">1</a></sup></p>
+<p>Some footnote here<sup id="fnref:fn" role="doc-noteref"><a href="#fn:fn"
class="footnote">1</a></sup></p>
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol>
- <li id="fn:fn">
- <p>Some text here <a href="#fnref:fn" class="reversefootnote">text
&8617; <img /></a></p>
+ <li id="fn:fn" role="doc-endnote">
+ <p>Some text here <a href="#fnref:fn" class="reversefootnote"
role="doc-backlink">text &8617; <img /></a></p>
</li>
</ol>
</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/span/04_footnote/footnote_nr.html
new/test/testcases/span/04_footnote/footnote_nr.html
--- old/test/testcases/span/04_footnote/footnote_nr.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/span/04_footnote/footnote_nr.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,12 +1,12 @@
-<p>This is a footnote<sup id="fnref:ab"><a href="#fn:ab"
class="footnote">35</a></sup>. And another<sup id="fnref:bc"><a href="#fn:bc"
class="footnote">36</a></sup>.</p>
+<p>This is a footnote<sup id="fnref:ab" role="doc-noteref"><a href="#fn:ab"
class="footnote">35</a></sup>. And another<sup id="fnref:bc"
role="doc-noteref"><a href="#fn:bc" class="footnote">36</a></sup>.</p>
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol start="35">
- <li id="fn:ab">
- <p>Some text. <a href="#fnref:ab" class="reversefootnote">↩</a></p>
+ <li id="fn:ab" role="doc-endnote">
+ <p>Some text. <a href="#fnref:ab" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
- <li id="fn:bc">
- <p>Some other text. <a href="#fnref:bc"
class="reversefootnote">↩</a></p>
+ <li id="fn:bc" role="doc-endnote">
+ <p>Some other text. <a href="#fnref:bc" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
</ol>
</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/span/04_footnote/footnote_prefix.html
new/test/testcases/span/04_footnote/footnote_prefix.html
--- old/test/testcases/span/04_footnote/footnote_prefix.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/span/04_footnote/footnote_prefix.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,12 +1,12 @@
-<p>This is a<sup id="fnref:adf123-ab"><a href="#fn:adf123-ab"
class="footnote">1</a></sup> footnote<sup id="fnref:adf123-ab:1"><a
href="#fn:adf123-ab" class="footnote">1</a></sup>. And another<sup
id="fnref:adf123-bc"><a href="#fn:adf123-bc" class="footnote">2</a></sup>.</p>
+<p>This is a<sup id="fnref:adf123-ab" role="doc-noteref"><a
href="#fn:adf123-ab" class="footnote">1</a></sup> footnote<sup
id="fnref:adf123-ab:1" role="doc-noteref"><a href="#fn:adf123-ab"
class="footnote">1</a></sup>. And another<sup id="fnref:adf123-bc"
role="doc-noteref"><a href="#fn:adf123-bc" class="footnote">2</a></sup>.</p>
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol>
- <li id="fn:adf123-ab">
- <p>Some text. <a href="#fnref:adf123-ab"
class="reversefootnote">↩</a> <a href="#fnref:adf123-ab:1"
class="reversefootnote">↩<sup>2</sup></a></p>
+ <li id="fn:adf123-ab" role="doc-endnote">
+ <p>Some text. <a href="#fnref:adf123-ab" class="reversefootnote"
role="doc-backlink">↩</a> <a href="#fnref:adf123-ab:1"
class="reversefootnote" role="doc-backlink">↩<sup>2</sup></a></p>
</li>
- <li id="fn:adf123-bc">
- <p>Some other text. <a href="#fnref:adf123-bc"
class="reversefootnote">↩</a></p>
+ <li id="fn:adf123-bc" role="doc-endnote">
+ <p>Some other text. <a href="#fnref:adf123-bc" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
</ol>
</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/span/04_footnote/inside_footnote.html
new/test/testcases/span/04_footnote/inside_footnote.html
--- old/test/testcases/span/04_footnote/inside_footnote.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/span/04_footnote/inside_footnote.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,17 +1,17 @@
-<p>Lorem ipsum<sup id="fnref:first"><a href="#fn:first"
class="footnote">1</a></sup> dolor sit amet.</p>
+<p>Lorem ipsum<sup id="fnref:first" role="doc-noteref"><a href="#fn:first"
class="footnote">1</a></sup> dolor sit amet.</p>
-<p>Lorem ipsum<sup id="fnref:second"><a href="#fn:second"
class="footnote">2</a></sup> dolor sit amet.</p>
+<p>Lorem ipsum<sup id="fnref:second" role="doc-noteref"><a href="#fn:second"
class="footnote">2</a></sup> dolor sit amet.</p>
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol>
- <li id="fn:first">
- <p>Consecutur adisping.<sup id="fnref:third"><a href="#fn:third"
class="footnote">3</a></sup> <a href="#fnref:first"
class="reversefootnote">↩</a></p>
+ <li id="fn:first" role="doc-endnote">
+ <p>Consecutur adisping.<sup id="fnref:third" role="doc-noteref"><a
href="#fn:third" class="footnote">3</a></sup> <a href="#fnref:first"
class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
- <li id="fn:second">
- <p>Sed ut perspiciatis unde omnis. <a href="#fnref:second"
class="reversefootnote">↩</a></p>
+ <li id="fn:second" role="doc-endnote">
+ <p>Sed ut perspiciatis unde omnis. <a href="#fnref:second"
class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
- <li id="fn:third">
- <p>Sed ut. <a href="#fnref:third" class="reversefootnote">↩</a></p>
+ <li id="fn:third" role="doc-endnote">
+ <p>Sed ut. <a href="#fnref:third" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
</ol>
</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/span/04_footnote/markers.html
new/test/testcases/span/04_footnote/markers.html
--- old/test/testcases/span/04_footnote/markers.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/span/04_footnote/markers.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,46 +1,46 @@
-<p>This is some *ref.<sup id="fnref:fn"><a href="#fn:fn"
class="footnote">1</a></sup></p>
+<p>This is some *ref.<sup id="fnref:fn" role="doc-noteref"><a href="#fn:fn"
class="footnote">1</a></sup></p>
<blockquote>
- <p>a blockquote <sup id="fnref:3"><a href="#fn:3"
class="footnote">2</a></sup></p>
+ <p>a blockquote <sup id="fnref:3" role="doc-noteref"><a href="#fn:3"
class="footnote">2</a></sup></p>
</blockquote>
<ul>
- <li>and a list item <sup id="fnref:1"><a href="#fn:1"
class="footnote">3</a></sup></li>
+ <li>and a list item <sup id="fnref:1" role="doc-noteref"><a href="#fn:1"
class="footnote">3</a></sup></li>
</ul>
-<h1>And a header<sup id="fnref:now"><a href="#fn:now"
class="footnote">4</a></sup></h1>
+<h1>And a header<sup id="fnref:now" role="doc-noteref"><a href="#fn:now"
class="footnote">4</a></sup></h1>
<p>A marker without a definition [^without].</p>
-<p>A marker <sup id="fnref:empty"><a href="#fn:empty"
class="footnote">5</a></sup> used twice<sup id="fnref:fn:1"><a href="#fn:fn"
class="footnote">1</a></sup> and thrice<sup id="fnref:fn:2"><a href="#fn:fn"
class="footnote">1</a></sup>.</p>
+<p>A marker <sup id="fnref:empty" role="doc-noteref"><a href="#fn:empty"
class="footnote">5</a></sup> used twice<sup id="fnref:fn:1"
role="doc-noteref"><a href="#fn:fn" class="footnote">1</a></sup> and thrice<sup
id="fnref:fn:2" role="doc-noteref"><a href="#fn:fn"
class="footnote">1</a></sup>.</p>
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol>
- <li id="fn:fn">
- <p>Some foot note text <a href="#fnref:fn"
class="reversefootnote">↩</a> <a href="#fnref:fn:1"
class="reversefootnote">↩<sup>2</sup></a> <a href="#fnref:fn:2"
class="reversefootnote">↩<sup>3</sup></a></p>
+ <li id="fn:fn" role="doc-endnote">
+ <p>Some foot note text <a href="#fnref:fn" class="reversefootnote"
role="doc-backlink">↩</a> <a href="#fnref:fn:1"
class="reversefootnote" role="doc-backlink">↩<sup>2</sup></a> <a
href="#fnref:fn:2" class="reversefootnote"
role="doc-backlink">↩<sup>3</sup></a></p>
</li>
- <li id="fn:3">
+ <li id="fn:3" role="doc-endnote">
<p>other text
with more lines</p>
<blockquote>
<p>and a quote</p>
</blockquote>
- <p><a href="#fnref:3" class="reversefootnote">↩</a></p>
+ <p><a href="#fnref:3" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
- <li id="fn:1">
- <p>some <em>text</em> <a href="#fnref:1"
class="reversefootnote">↩</a></p>
+ <li id="fn:1" role="doc-endnote">
+ <p>some <em>text</em> <a href="#fnref:1" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
- <li id="fn:now">
+ <li id="fn:now" role="doc-endnote">
<pre><code>code block
continued here
</code></pre>
- <p><a href="#fnref:now" class="reversefootnote">↩</a></p>
+ <p><a href="#fnref:now" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
- <li id="fn:empty">
+ <li id="fn:empty" role="doc-endnote">
- <p><a href="#fnref:empty" class="reversefootnote">↩</a></p>
+ <p><a href="#fnref:empty" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
</ol>
</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/span/04_footnote/placement.html
new/test/testcases/span/04_footnote/placement.html
--- old/test/testcases/span/04_footnote/placement.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/span/04_footnote/placement.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,11 +1,11 @@
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol>
- <li id="fn:1">
- <p>Footnote \` text <a href="#fnref:1"
class="reversefootnote">↩</a></p>
+ <li id="fn:1" role="doc-endnote">
+ <p>Footnote \` text <a href="#fnref:1" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
</ol>
</div>
-<p>Some para with a<sup id="fnref:1"><a href="#fn:1"
class="footnote">1</a></sup> footnote.</p>
+<p>Some para with a<sup id="fnref:1" role="doc-noteref"><a href="#fn:1"
class="footnote">1</a></sup> footnote.</p>
<p>And another para.</p>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/span/04_footnote/regexp_problem.html
new/test/testcases/span/04_footnote/regexp_problem.html
--- old/test/testcases/span/04_footnote/regexp_problem.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/span/04_footnote/regexp_problem.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,14 +1,14 @@
<h1>Something</h1>
-<p>something<sup id="fnref:note1"><a href="#fn:note1"
class="footnote">1</a></sup>.</p>
+<p>something<sup id="fnref:note1" role="doc-noteref"><a href="#fn:note1"
class="footnote">1</a></sup>.</p>
<h1>Footnotes</h1>
<h1>Test</h1>
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol>
- <li id="fn:note1">
+ <li id="fn:note1" role="doc-endnote">
- <p>A note <a href="#fnref:note1"
class="reversefootnote">↩</a></p>
+ <p>A note <a href="#fnref:note1" class="reversefootnote"
role="doc-backlink">↩</a></p>
</li>
</ol>
</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore'
old/test/testcases/span/04_footnote/without_backlink.html
new/test/testcases/span/04_footnote/without_backlink.html
--- old/test/testcases/span/04_footnote/without_backlink.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/span/04_footnote/without_backlink.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,8 +1,8 @@
-<p>Some footnote here<sup id="fnref:fn"><a href="#fn:fn"
class="footnote">1</a></sup></p>
+<p>Some footnote here<sup id="fnref:fn" role="doc-noteref"><a href="#fn:fn"
class="footnote">1</a></sup></p>
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol>
- <li id="fn:fn">
+ <li id="fn:fn" role="doc-endnote">
<p>Some text here</p>
</li>
</ol>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/span/abbreviations/in_footnote.html
new/test/testcases/span/abbreviations/in_footnote.html
--- old/test/testcases/span/abbreviations/in_footnote.html 2019-01-31
20:20:09.000000000 +0100
+++ new/test/testcases/span/abbreviations/in_footnote.html 2020-04-23
16:16:30.000000000 +0200
@@ -1,9 +1,9 @@
-<p>There is a <abbr title="Text File">TXT</abbr> file here. <sup
id="fnref:1"><a href="#fn:1" class="footnote">1</a></sup></p>
+<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">1</a></sup></p>
-<div class="footnotes">
+<div class="footnotes" role="doc-endnotes">
<ol>
- <li id="fn:1">
- <p>A <abbr title="Text File">TXT</abbr> file. <a href="#fnref:1"
class="reversefootnote">↩</a></p>
+ <li id="fn:1" role="doc-endnote">
+ <p>A <abbr title="Text File">TXT</abbr> file. <a href="#fnref:1"
class="reversefootnote" role="doc-backlink">↩</a></p>
</li>
</ol>
</div>
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/test/testcases/span/math/normal.html
new/test/testcases/span/math/normal.html
--- old/test/testcases/span/math/normal.html 2019-01-31 20:20:09.000000000
+0100
+++ new/test/testcases/span/math/normal.html 2020-04-23 16:16:30.000000000
+0200
@@ -1,10 +1,10 @@
-<p>This is <script type="math/tex">\lambda_\alpha > 5</script> some math. With
<script type="math/tex">1
-+ 1</script> new line characters in between.</p>
+<p>This is \(\lambda_\alpha > 5\) some math. With \(1
++ 1\) new line characters in between.</p>
-<p><script type="math/tex">5+5</script> inline math, $5.00 $$no math$$</p>
+<p>\(5+5\) inline math, $5.00 $$no math$$</p>
<p>$$5+5$$ inline math</p>
-<p><script type="math/tex">5+5</script></p>
+<p>\(5+5\)</p>
<p>$$5+5$$</p>