diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2023-03-29 02:42:35 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-03-29 02:42:35 -0600 |
| commit | 10c04dbf339c293d5d2d703dbd0498c0953adfb5 (patch) | |
| tree | 69dc9790afb79116a9a3119f7f73d6b4f60cce26 /lib | |
| parent | 08b715f8f114df9d51a7b6814e3e948213650c46 (diff) | |
resolves #2410 catalog all footnotes found inside AsciiDoc table cells (PR #2411)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/asciidoctor/pdf/ext/prawn-table/cell/asciidoc.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/asciidoctor/pdf/ext/prawn-table/cell/asciidoc.rb b/lib/asciidoctor/pdf/ext/prawn-table/cell/asciidoc.rb index 28f53bb4..3ae41361 100644 --- a/lib/asciidoctor/pdf/ext/prawn-table/cell/asciidoc.rb +++ b/lib/asciidoctor/pdf/ext/prawn-table/cell/asciidoc.rb @@ -42,14 +42,12 @@ module Prawn apply_font_properties do extent = @pdf.dry_run keep_together: true, single_page: true do push_scratch parent_doc - doc.catalog[:footnotes] = parent_doc.catalog[:footnotes] # NOTE: we should be able to use cell.max_width, but returns 0 in some conditions (like when colspan > 1) indent cell.padding_left, bounds.width - cell.width + cell.padding_right do move_down padding_y if padding_y > 0 conceal_page_top { traverse cell.content } end pop_scratch parent_doc - doc.catalog[:footnotes] = parent_doc.catalog[:footnotes] end end # NOTE: prawn-table doesn't support cells that exceed the height of a single page @@ -90,6 +88,8 @@ module Prawn # end # end start_page = pdf.page_number + parent_doc = (doc = content.document).nested? ? doc.parent_document : doc + doc.catalog[:footnotes] = parent_doc.catalog[:footnotes] # TODO: apply horizontal alignment; currently it is necessary to specify alignment on content blocks apply_font_properties { pdf.traverse content } if (extra_pages = pdf.page_number - start_page) > 0 |
