Method: ConverterBase#erase_postscript
- Defined in:
- lib/converterbase.rb
#erase_postscript(data) ⇒ Object
後書きを削除する
1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 |
# File 'lib/converterbase.rb', line 1079 def erase_postscript(data) del_count = 0 data.gsub!(/#{AUTHOR_COMMENT_CHUKI[:postscript][:open]}.+?#{AUTHOR_COMMENT_CHUKI[:postscript][:close]}\n([#改ページ]|\z)/m) do del_count += 1 $1 end if del_count > 0 @inspector.info("後書きをすべて削除しました。削除した数は#{del_count}個です。") end end |