diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2022-04-27 18:19:22 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2022-04-27 18:19:22 -0600 |
| commit | 70af8af4e783866a10f2323bbf46c417924eae65 (patch) | |
| tree | 1b33588a7b8ed6a42aafe95849c93592627abfed | |
| parent | f1c34a7dcf16d45e5e508a664ff9f80a0152f77a (diff) | |
use role assignment instead of add_role to add a role when no role is present [no ci]
| -rw-r--r-- | lib/asciidoctor/pdf/converter.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/asciidoctor/pdf/converter.rb b/lib/asciidoctor/pdf/converter.rb index 48c13ab9..c3db19d0 100644 --- a/lib/asciidoctor/pdf/converter.rb +++ b/lib/asciidoctor/pdf/converter.rb @@ -811,7 +811,7 @@ module Asciidoctor def convert_preamble node # FIXME: core should not be promoting paragraph to preamble if there are no sections if node.blocks? && (first_block = node.blocks[0]).context == :paragraph && node.document.sections? && !first_block.role? - first_block.add_role 'lead' + first_block.role = 'lead' end traverse node theme_margin :block, :bottom, (next_enclosed_block node) |
