diff options
| -rw-r--r-- | spec/outline_spec.rb | 2 | ||||
| -rw-r--r-- | spec/toc_spec.rb | 11 |
2 files changed, 12 insertions, 1 deletions
diff --git a/spec/outline_spec.rb b/spec/outline_spec.rb index 7117f5ea..1d5fbade 100644 --- a/spec/outline_spec.rb +++ b/spec/outline_spec.rb @@ -177,7 +177,7 @@ describe 'Asciidoctor::PDF::Converter - Outline' do (expect outline[1][:title]).to eql 'First Chapter' end - it 'should decode character references in titles' do + it 'should decode character references in entries' do pdf = to_pdf <<~'EOS', doctype: :book = ACME(TM) Catalog <№ 1> diff --git a/spec/toc_spec.rb b/spec/toc_spec.rb index cf50c02a..3d6f808d 100644 --- a/spec/toc_spec.rb +++ b/spec/toc_spec.rb @@ -456,4 +456,15 @@ describe 'Asciidoctor::PDF::Converter - TOC' do (expect to_file).to visually_match 'toc-running-content-font-color.pdf' end + + it 'should decode character references in toc entries' do + pdf = to_pdf <<~'EOS', analyze: true + = Document Title + :toc: + + == Paper Clips № 4 + EOS + + (expect pdf.find_text %(Paper Clips \u2116\u00a04)).to have_size 2 + end end |
