diff options
| author | Dan Allen <dan.j.allen@gmail.com> | 2020-05-20 23:45:40 -0600 |
|---|---|---|
| committer | Dan Allen <dan.j.allen@gmail.com> | 2020-05-21 01:49:45 -0600 |
| commit | 98273ef16d73e74def9b762ad36adaeab620e790 (patch) | |
| tree | dbb6caf2ac207c5fb18cf4b3bda34db409c4ed71 /spec/list_spec.rb | |
| parent | 8ac3ddc6391da707833c1786f020ab9820f00487 (diff) | |
verify indent for list can be disabled
Diffstat (limited to 'spec/list_spec.rb')
| -rw-r--r-- | spec/list_spec.rb | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/spec/list_spec.rb b/spec/list_spec.rb index ea046e5e..7a8acd51 100644 --- a/spec/list_spec.rb +++ b/spec/list_spec.rb @@ -44,6 +44,23 @@ describe 'Asciidoctor::PDF::Converter - List' do (expect (pdf.find_text 'level one')[0][:x]).to eql (pdf.find_text 'back to level one')[0][:x] end + it 'should disable indent for list if outline_list_indent is 0' do + pdf = to_pdf <<~'EOS', analyze: true + before + + * a + * b + * c + + after + EOS + + (expect pdf.lines).to include %(\u2022 a) + before_text = (pdf.find_text 'before')[0] + list_item_text = (pdf.find_text 'a')[0] + (expect before_text[:x]).to eql list_item_text[:x] + end + it 'should use marker specified by style' do pdf = to_pdf <<~'EOS', analyze: true [square] @@ -102,6 +119,24 @@ describe 'Asciidoctor::PDF::Converter - List' do (expect indents[0]).to be > left_margin end + it 'should disable indent for no-bullet list if outline_list_indent is 0' do + pdf = to_pdf <<~'EOS', analyze: true + before + + [no-bullet] + * a + * b + * c + + after + EOS + + (expect pdf.lines).to include 'a' + before_text = (pdf.find_text 'before')[0] + list_item_text = (pdf.find_text 'a')[0] + (expect before_text[:x]).to eql list_item_text[:x] + end + it 'should apply proper indentation for each list style that hides the marker' do pdf = to_pdf <<~'EOS', analyze: true reference |
