diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2022-04-27 04:31:38 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2022-04-27 04:31:38 -0600 |
| commit | 94cdbfd5ca9b392031dfe1e00ca6f51d3d64cba1 (patch) | |
| tree | d0917ab14b414805f7ab7cf970c33615323dab90 | |
| parent | bd51a9dbc6fad55d5f2847449fd6f2b057cb52a1 (diff) | |
change name of untitled option on special section to notitle
| -rw-r--r-- | CHANGELOG.adoc | 1 | ||||
| -rw-r--r-- | lib/asciidoctor/pdf/converter.rb | 2 | ||||
| -rw-r--r-- | spec/section_spec.rb | 8 |
3 files changed, 6 insertions, 5 deletions
diff --git a/CHANGELOG.adoc b/CHANGELOG.adoc index 8285674d..64e77a13 100644 --- a/CHANGELOG.adoc +++ b/CHANGELOG.adoc @@ -15,6 +15,7 @@ Enhancements:: * add support for `background-color` property on caption (#1995) * add support for image-based icons, resolved from `iconsdir` and having the `icontype` file extension (#1770) * add `asciidoctor/pdf/nogmagick` script to prevent Gmagick from handling PNG images (#1687) +* change name of `untitled` option on special section to `notitle` Bug Fixes:: diff --git a/lib/asciidoctor/pdf/converter.rb b/lib/asciidoctor/pdf/converter.rb index 0756df63..bae87b95 100644 --- a/lib/asciidoctor/pdf/converter.rb +++ b/lib/asciidoctor/pdf/converter.rb @@ -674,7 +674,7 @@ module Asciidoctor theme_font(:heading, level: hlevel) { start_new_part sect } end elsif chapterlike - hopts[:hidden] = hidden = true if sect.special && (sect.option? 'untitled') + hopts[:hidden] = hidden = true if sect.special && (sect.option? 'notitle') if @theme.heading_chapter_break_before != 'auto' || (@theme.heading_part_break_after == 'always' && sect == sect.parent.sections[0]) start_new = true diff --git a/spec/section_spec.rb b/spec/section_spec.rb index a0fe54f6..6e28fab5 100644 --- a/spec/section_spec.rb +++ b/spec/section_spec.rb @@ -713,12 +713,12 @@ describe 'Asciidoctor::PDF::Converter - Section' do (expect appendix_text[:page_number]).to be 4 end - it 'should not output section title for special section marked with untitled option' do + it 'should not output section title for special section marked with notitle option' do pdf = to_pdf <<~'EOS', pdf_theme: { heading_h2_font_color: 'AA0000' }, analyze: true = Document Title :doctype: book - [colophon%untitled] + [colophon%notitle] = Hide Me Colophon with no title. @@ -748,7 +748,7 @@ describe 'Asciidoctor::PDF::Converter - Section' do (expect appendix_text[:page_number]).to be 5 end - it 'should not leave behind dest for empty section marked with untitled option' do + it 'should not leave behind dest for empty section marked with notitle option' do pdf = to_pdf <<~'EOS' = Document Title :doctype: book @@ -757,7 +757,7 @@ describe 'Asciidoctor::PDF::Converter - Section' do Musings. - [colophon%untitled] + [colophon%notitle] == Hidden EOS |
