summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2022-08-29 23:58:15 -0600
committerDan Allen <dan.j.allen@gmail.com>2022-08-30 01:24:03 -0600
commit6bc871928ff3958a9ff15fd76745522437bd07d5 (patch)
tree5b87a1c386ca25c6e2ea8bd1f520dfeb2eb30904 /lib
parentbd5e51d98a9e2f98016035891f7d1b916c17b05d (diff)
don't include children of section with empty title in outline
Diffstat (limited to 'lib')
-rw-r--r--lib/asciidoctor/pdf/converter.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/asciidoctor/pdf/converter.rb b/lib/asciidoctor/pdf/converter.rb
index 53fa9433..40d15bea 100644
--- a/lib/asciidoctor/pdf/converter.rb
+++ b/lib/asciidoctor/pdf/converter.rb
@@ -2794,6 +2794,7 @@ module Asciidoctor
next if (num_levels_for_sect = (sect.attr 'outlinelevels', num_levels).to_i) < (level = sect.level) ||
((sect.option? 'notitle') && sect == sect.document.last_child && sect.empty?)
sect_title = sanitize sect.numbered_title formal: true
+ next if sect_title.empty?
sect_destination = sect.attr 'pdf-destination'
if level < num_levels_for_sect && sect.sections?
outline.section sect_title, destination: sect_destination, closed: expand_levels < 1 do