Skip to content

Commit

Permalink
Merge pull request #1778 from kmuto/epubtype-fix1776
Browse files Browse the repository at this point in the history
correct epub:type
  • Loading branch information
kmuto authored Jan 7, 2022
2 parents 08d66b8 + 19ef23d commit e9bb264
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
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

0 comments on commit e9bb264

Please sign in to comment.