diff options
| author | Marat Radchenko <marat@slonopotamus.org> | 2020-09-22 12:35:43 +0300 |
|---|---|---|
| committer | Marat Radchenko <marat@slonopotamus.org> | 2020-09-22 12:35:43 +0300 |
| commit | edeb5da775259897239c2723a813122c2a7ec16a (patch) | |
| tree | 737af15f45917664cfe3e5a4197adb62fb8c5740 /spec | |
| parent | 6fd56aa3ecd3496bdbd50fe9be034ed2f2e15dfa (diff) | |
resolves #370 do not add multiple entries for same media files in book manifest
Diffstat (limited to 'spec')
| -rw-r--r-- | spec/fixtures/inline-image/subdir/chapter.adoc | 2 | ||||
| -rw-r--r-- | spec/image_spec.rb | 5 |
2 files changed, 7 insertions, 0 deletions
diff --git a/spec/fixtures/inline-image/subdir/chapter.adoc b/spec/fixtures/inline-image/subdir/chapter.adoc index fdfd24b..40fab47 100644 --- a/spec/fixtures/inline-image/subdir/chapter.adoc +++ b/spec/fixtures/inline-image/subdir/chapter.adoc @@ -4,6 +4,8 @@ A image:wolpertinger.jpg[] B +image:wolpertinger.jpg[] B + Z [separator=¦] diff --git a/spec/image_spec.rb b/spec/image_spec.rb index 3e8d9a7..78d3d3f 100644 --- a/spec/image_spec.rb +++ b/spec/image_spec.rb @@ -30,6 +30,11 @@ describe 'Asciidoctor::Epub3::Converter - Image' do expect(book).to have_item_with_href('imagez/wolpertinger.jpg') end + it 'does not duplicate images in manifest' do + book, = to_epub fixture_file('inline-image/book.adoc') + expect(book.items.keys.select {|k| k.include? 'wolpertinger' }.size).to eq(1) + end + it 'converts font-based icons to CSS' do book, = to_epub fixture_file('icon/book.adoc') chapter = book.item_by_href '_chapter.xhtml' |
