summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorMarat Radchenko <marat@slonopotamus.org>2020-04-17 01:39:21 +0300
committerGitHub <noreply@github.com>2020-04-17 01:39:21 +0300
commit1fa8d7c40e1098c9875752fd7ed295350054d3f6 (patch)
tree2a93e7a572131958c3ef7299168e50df48c452de /spec
parent65f8f4b3ab73a03ffe1b232453ea04c621f3d4e2 (diff)
resolves #327 add customizable splitting into chapters (#328)
Diffstat (limited to 'spec')
-rw-r--r--spec/converter_spec.rb25
1 files changed, 25 insertions, 0 deletions
diff --git a/spec/converter_spec.rb b/spec/converter_spec.rb
index e3b1252..3d1e24e 100644
--- a/spec/converter_spec.rb
+++ b/spec/converter_spec.rb
@@ -156,6 +156,31 @@ describe Asciidoctor::Epub3::Converter do
expect(chapter_b.content).not_to include footnote
end
+ it 'supports custom epub-chapter-level' do
+ book = to_epub <<~EOS
+= Book
+:epub-chapter-level: 2
+:doctype: book
+
+text0
+
+== Level 1
+
+text1
+
+=== Level 2
+
+text2
+
+==== Level 3
+
+text3
+ EOS
+
+ spine = book.spine.itemref_list
+ expect(spine).to have_size(3)
+ end
+
it 'resolves deep includes relative to document that contains include directive' do
book, = to_epub fixture_file('deep-include/book.adoc')
chapter = book.item_by_href '_chapter.xhtml'