Method: ConverterBase#erase_introduction
- Defined in:
- lib/converterbase.rb
#erase_introduction(data) ⇒ Object
前書きを削除する
1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 |
# File 'lib/converterbase.rb', line 1111 def erase_introduction(data) del_count = 0 data.gsub!(/([#改ページ])\n#{AUTHOR_COMMENT_CHUKI[:introduction][:open]}.+?#{AUTHOR_COMMENT_CHUKI[:introduction][:close]}/m) do del_count += 1 $1 end if del_count > 0 @inspector.info("前書きをすべて削除しました。削除した数は#{del_count}個です。") end end |