summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2023-03-29 02:42:35 -0600
committerGitHub <noreply@github.com>2023-03-29 02:42:35 -0600
commit10c04dbf339c293d5d2d703dbd0498c0953adfb5 (patch)
tree69dc9790afb79116a9a3119f7f73d6b4f60cce26 /spec
parent08b715f8f114df9d51a7b6814e3e948213650c46 (diff)
resolves #2410 catalog all footnotes found inside AsciiDoc table cells (PR #2411)
Diffstat (limited to 'spec')
-rw-r--r--spec/table_spec.rb24
1 files changed, 23 insertions, 1 deletions
diff --git a/spec/table_spec.rb b/spec/table_spec.rb
index 0b21ac96..485b0ce4 100644
--- a/spec/table_spec.rb
+++ b/spec/table_spec.rb
@@ -2028,7 +2028,7 @@ describe 'Asciidoctor::PDF::Converter - Table' do
(expect (markers_x[0] - left_edge).round 2).to eql reference_x
end
- it 'should capture footnotes in AsciiDoc table cell and render them with other footnotes' do
+ it 'should capture footnote in AsciiDoc table cell and render them with other footnotes' do
pdf = to_pdf <<~'END', analyze: true
before{empty}footnote:[Footnote before table]
@@ -2050,6 +2050,28 @@ describe 'Asciidoctor::PDF::Converter - Table' do
(expect pdf.lines).to eql expected_lines
end
+ it 'should capture footnotes in multiple AsciiDoc table cells and render them with other footnotes' do
+ pdf = to_pdf <<~'END', analyze: true
+ [cols=1a]
+ |===
+ |first{empty}footnote:[First footnote inside table]
+ |second{empty}footnote:[Second footnote inside table]
+ |===
+
+ third{empty}footnote:[Footnote outside of table]
+ END
+
+ expected_lines = [
+ 'first[1]',
+ 'second[2]',
+ 'third[3]',
+ '1. First footnote inside table',
+ '2. Second footnote inside table',
+ '3. Footnote outside of table',
+ ]
+ (expect pdf.lines).to eql expected_lines
+ end
+
it 'should not fail to fit content in table cell and create blank page when margin bottom is 0' do
pdf_theme = {
base_font_family: 'M+ 1mn',