diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2022-05-16 04:32:10 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2022-05-16 04:32:10 -0600 |
| commit | be548159ad500432f9ab1e73db8d65aa2d2c39c5 (patch) | |
| tree | b4baa4ba7725f17208cfb3c58220a952b9cb0b70 | |
| parent | 1f0a43a1a450d8d4e1d1990881b6719e6a7c7bb5 (diff) | |
remove workaround for computing cursor in column box; call move_past_bottom on current bounds
| -rw-r--r-- | lib/asciidoctor/pdf/converter.rb | 7 | ||||
| -rw-r--r-- | lib/asciidoctor/pdf/ext/prawn/extensions.rb | 2 |
2 files changed, 4 insertions, 5 deletions
diff --git a/lib/asciidoctor/pdf/converter.rb b/lib/asciidoctor/pdf/converter.rb index 18e0805a..e0375e53 100644 --- a/lib/asciidoctor/pdf/converter.rb +++ b/lib/asciidoctor/pdf/converter.rb @@ -3848,13 +3848,12 @@ module Asciidoctor def margin amount, _side if (amount || 0) == 0 || at_page_top? 0 - # NOTE: use low-level cursor calculation to workaround cursor bug in column_box context - elsif y - reference_bounds.absolute_bottom > amount + elsif cursor > amount move_down amount amount else - # set cursor at top of next page - reference_bounds.move_past_bottom + # move cursor to top of next page + bounds.move_past_bottom 0 end end diff --git a/lib/asciidoctor/pdf/ext/prawn/extensions.rb b/lib/asciidoctor/pdf/ext/prawn/extensions.rb index f17a1fda..6cbcfbdc 100644 --- a/lib/asciidoctor/pdf/ext/prawn/extensions.rb +++ b/lib/asciidoctor/pdf/ext/prawn/extensions.rb @@ -601,7 +601,7 @@ module Asciidoctor bounds.add_right_padding p_right yield ensure - cursor > p_bottom ? (move_down p_bottom) : reference_bounds.move_past_bottom unless at_page_top? + cursor > p_bottom ? (move_down p_bottom) : bounds.move_past_bottom unless at_page_top? @bottom_gutters.pop bounds.subtract_left_padding p_left bounds.subtract_right_padding p_right |
