template/novel.txt.erb in narou-1.5.11 vs template/novel.txt.erb in narou-1.6.0

- old
+ new

@@ -7,34 +7,47 @@ <% if toc["story"] != "" -%> あらすじ: <%= toc["story"] %> <% end -%> -掲載ページ: <a href="<%= toc["toc_url"] %>"><%= toc["toc_url"] %></a> +掲載ページ: +<a href="<%= Helper.ampersand_to_entity(toc["toc_url"]) %>"><%= toc["toc_url"] %></a> [#区切り線] <% sections.each_with_index do |section, i| -%> [#改ページ] <% if section["chapter"] != "" -%> [#ページの左右中央] [#ここから柱]<%= toc["title"] %>[#ここで柱終わり] +<% if device && device.ibooks? -%> +<%# ibooks だと左右中央が機能しないため -%> +<%= "\n" * 6 -%> +<% end -%> [#3字下げ][#ここから大見出し]<%= section["chapter"] %>[#ここで大見出し終わり] [#改ページ] <% end -%> [#3字下げ][#ここから中見出し]<%= section["subtitle"].rstrip %>[#ここで中見出し終わり] <% if section["element"]["introduction"] != "" -%> [#ここから前書き] -<%= section["element"]["introduction"] %> +<% introduction, illust_chuki_array = Helper.extract_illust_chuki(section["element"]["introduction"]) -%> +<%= introduction %> [#ここで前書き終わり] +<% if illust_chuki_array.count > 0 -%> +<%= illust_chuki_array.join("\n") %> <% end -%> +<% end -%> <%= section["element"]["body"] %> <% if section["element"]["postscript"] != "" -%> [#ここから後書き] -<%= section["element"]["postscript"] %> +<% postscript, illust_chuki_array = Helper.extract_illust_chuki(section["element"]["postscript"]) -%> +<%= postscript %> [#ここで後書き終わり] +<% if illust_chuki_array.count > 0 -%> +<%= illust_chuki_array.join("\n") %> +<% end -%> <% end -%> <% end -%> <% if setting.enable_display_end_of_book -%> [#ここから地付き][#小書き](本を読み終わりました)[#小書き終わり][#ここで地付き終わり] <% end -%>