Sha256: 5dca4b92eeb0de1a5d9e1b1682daaae45ba63c61e68cf3d8653a6624a35857dc
Contents?: true
Size: 940 Bytes
Versions: 47
Compression:
Stored size: 940 Bytes
Contents
# -*- coding: utf-8 -*- # # 対象小説情報 # タイトル: オーバーロード:後編 # 作者: 丸山くがね # URL: http://ncode.syosetu.com/n1839bd/ # converter "オーバーロード:後編" do def before(io, text_type) super end def after(io, text_type) if io.string.scan(/[<<〈((]([ぁ-んァ-ヴーゞ・A-Za-zA-Za-z]+?)[>>〉))]/).length > 0 @inspector.warning("オバロっぽいルビを検出:#{$1}") end io.string.gsub!(/[≪『](.+?)/(.+?)[≫』]/) do spell_ruby, spell_name = $1, $2 if spell_name =~ /^([ぁ-んァ-ヴーゞ・A-Za-zA-Za-z]+)$/ spell_name = spell_ruby spell_ruby = $& end option = "" if spell_ruby =~ /^――(.+)/ spell_ruby = $1 option = "――" end "#{option}≪|#{spell_name}《#{spell_ruby}》≫" end io end end
Version data entries
47 entries across 47 versions & 1 rubygems