summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2015-10-31 02:18:31 -0600
committerDan Allen <dan.j.allen@gmail.com>2015-10-31 02:18:31 -0600
commit0bba67bfbaf62074bcd7d69fa53b23b3c4457cf6 (patch)
tree5209a8a2e9453b69c2bd6c005640d543629851b0
parent3ffbc06665808c9395d6c2db759ba7dd38c0c543 (diff)
include full stop after footnote number in embeddable HTML
-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