Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

correct epub:type #1778

Merged
merged 2 commits into from
Jan 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions lib/review/epubmaker/epubcommon.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# = epubcommon.rb -- super class for EPUBv2 and EPUBv3
#
# Copyright (c) 2010-2021 Kenshi Muto and Masayoshi Takahashi
# Copyright (c) 2010-2022 Kenshi Muto and Masayoshi Takahashi
#
# This program is free software.
# You can distribute or modify this program under the terms of
Expand Down Expand Up @@ -103,7 +103,7 @@ def coverimage
# If Producer#config["coverimage"] is defined, it will be used for
# the cover image.
def cover
@body_ext = config['epubversion'] >= 3 ? %Q( epub:type="cover") : ''
@body_ext = config['epubversion'] >= 3 ? %Q( epub:type="cover") : nil

if config['coverimage']
@coverimage_src = coverimage
Expand All @@ -119,7 +119,9 @@ def cover
else
'./html/layout-xhtml1.html.erb'
end
ReVIEW::Template.generate(path: template_path, binding: binding)
ret = ReVIEW::Template.generate(path: template_path, binding: binding)
@body_ext = nil
ret
end

# Return title (copying) content.
Expand Down Expand Up @@ -211,7 +213,6 @@ def date_to_s(date)
# Return own toc content.
def mytoc
@title = h(ReVIEW::I18n.t('toctitle'))

@body = %Q( <h1 class="toc-title">#{h(ReVIEW::I18n.t('toctitle'))}</h1>\n)
if config['epubmaker']['flattoc'].nil?
@body << hierarchy_ncx('ul')
Expand Down
2 changes: 1 addition & 1 deletion lib/review/epubmaker/epubv3.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# = epubv3.rb -- EPUB version 3 producer.
#
# Copyright (c) 2010-2017 Kenshi Muto
# Copyright (c) 2010-2022 Kenshi Muto
#
# This program is free software.
# You can distribute or modify this program under the terms of
Expand Down