Sha256: 78fc882cd8bb71cd32b9add47824223df306a10c687591c646bd5bb5b8520cbd
Contents?: true
Size: 915 Bytes
Versions: 87
Compression:
Stored size: 915 Bytes
Contents
# -*- coding: utf-8 -*- # # 対象小説情報 # タイトル: オーバーロード:後編 # 作者: 丸山くがね # URL: http://ncode.syosetu.com/n1839bd/ # converter "n1839bd オーバーロード:後編" 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
87 entries across 87 versions & 1 rubygems