summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/asciidoctor/converter/html5.rb3
-rw-r--r--test/document_test.rb5
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/asciidoctor/converter/html5.rb b/lib/asciidoctor/converter/html5.rb
index d9fe39ca..ec648d44 100644
--- a/lib/asciidoctor/converter/html5.rb
+++ b/lib/asciidoctor/converter/html5.rb
@@ -284,10 +284,9 @@ MathJax.Hub.Config({
<hr#{@void_element_slash}>)
node.footnotes.each do |footnote|
result << %(<div class="footnote" id="_footnote_#{footnote.index}">
-<a href="#_footnoteref_#{footnote.index}">#{footnote.index}</a> #{footnote.text}
+<a href="#_footnoteref_#{footnote.index}">#{footnote.index}</a>. #{footnote.text}
</div>)
end
-
result << '</div>'
end
diff --git a/test/document_test.rb b/test/document_test.rb
index aa1817a1..309cddbb 100644
--- a/test/document_test.rb
+++ b/test/document_test.rb
@@ -1514,6 +1514,11 @@ Text that has supporting information{empty}footnote:[An example footnote.].
output = render_embedded_string input
assert_css '#footnotes', output, 1
+ assert_css '#footnotes .footnote', output, 1
+ assert_css '#footnotes .footnote#_footnote_1', output, 1
+ assert_xpath '//div[@id="footnotes"]/div[@id="_footnote_1"]/a[@href="#_footnoteref_1"][text()="1"]', output, 1
+ text = xmlnodes_at_xpath '//div[@id="footnotes"]/div[@id="_footnote_1"]/text()', output, 1
+ assert_equal '. An example footnote.', text.text.strip
end
test 'does not render footnotes block in embedded document if nofootnotes attribute is set' do