diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2022-08-26 23:56:27 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2022-08-26 23:56:27 -0600 |
| commit | 024f56f3b790180cebbe25a93e7e5d679fdfca8f (patch) | |
| tree | 0345a396f2ddeb1d53a344d7030978602b7c209b | |
| parent | 3e60533399cf19804bc54de2b9de052d17c0742a (diff) | |
revert kwarg to opts on numbered_title method
the way we invoke the method makes it impossible to support kwargs across Ruby impls
| -rw-r--r-- | lib/asciidoctor/pdf/converter.rb | 4 | ||||
| -rw-r--r-- | lib/asciidoctor/pdf/ext/asciidoctor/section.rb | 4 | ||||
| -rw-r--r-- | lib/asciidoctor/pdf/section_info_by_page.rb | 2 |
3 files changed, 5 insertions, 5 deletions
diff --git a/lib/asciidoctor/pdf/converter.rb b/lib/asciidoctor/pdf/converter.rb index 676ac4d2..105d68ca 100644 --- a/lib/asciidoctor/pdf/converter.rb +++ b/lib/asciidoctor/pdf/converter.rb @@ -128,8 +128,8 @@ module Asciidoctor ViewportWidth = ::Module.new ImageWidth = ::Module.new (TitleStyles = { - 'toc' => [:numbered_title, {}], - 'basic' => [:title, {}], + 'toc' => [:numbered_title], + 'basic' => [:title], }).default = [:numbered_title, formal: true] def initialize backend, opts diff --git a/lib/asciidoctor/pdf/ext/asciidoctor/section.rb b/lib/asciidoctor/pdf/ext/asciidoctor/section.rb index 67214963..28d011c5 100644 --- a/lib/asciidoctor/pdf/ext/asciidoctor/section.rb +++ b/lib/asciidoctor/pdf/ext/asciidoctor/section.rb @@ -1,7 +1,7 @@ # frozen_string_literal: true class Asciidoctor::Section - def numbered_title formal: nil + def numbered_title opts = {} @cached_numbered_title ||= nil unless @cached_numbered_title if @numbered && !@caption && (slevel = @level) <= (@document.attr 'sectnumlevels', 3).to_i @@ -28,7 +28,7 @@ class Asciidoctor::Section @cached_numbered_title = @cached_formal_numbered_title = captioned_title end end - formal ? @cached_formal_numbered_title : @cached_numbered_title + opts[:formal] ? @cached_formal_numbered_title : @cached_numbered_title end unless method_defined? :numbered_title def first_section_of_part? diff --git a/lib/asciidoctor/pdf/section_info_by_page.rb b/lib/asciidoctor/pdf/section_info_by_page.rb index f6a346d7..581b5741 100644 --- a/lib/asciidoctor/pdf/section_info_by_page.rb +++ b/lib/asciidoctor/pdf/section_info_by_page.rb @@ -10,7 +10,7 @@ module Asciidoctor def []= pgnum, val if ::Asciidoctor::Section === val - @table[pgnum] = { title: (val.send @title_method[0], **@title_method[1]), numeral: val.numeral } + @table[pgnum] = { title: val.send(*@title_method), numeral: val.numeral } else @table[pgnum] = { title: val } end |
