diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2022-07-20 17:08:06 -0600 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-07-20 17:08:06 -0600 |
| commit | 79bf9f4dfd4fe5cacd8d136cc8858f2376f15cbc (patch) | |
| tree | 6ca7d931b73bfcff22756c7ad19158a175f93307 /lib | |
| parent | 4aa06455d07e349bd30786704ae203cc143c3546 (diff) | |
resolves #2269 allow top keys in title-page theme category to accept a fixed value (PR #2287)
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/asciidoctor/pdf/converter.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/asciidoctor/pdf/converter.rb b/lib/asciidoctor/pdf/converter.rb index 22d56635..031f2a42 100644 --- a/lib/asciidoctor/pdf/converter.rb +++ b/lib/asciidoctor/pdf/converter.rb @@ -5040,7 +5040,9 @@ module Asciidoctor end def resolve_top val - if val.end_with? 'vh' + if ::Numeric === val + @y - val + elsif val.end_with? 'vh' page_height * (1 - (val.to_f / 100)) elsif val.end_with? '%' @y - effective_page_height * (val.to_f / 100) |
