Sha256: 6f350d2c9d6fc7b1d668ac57bb220d560b1d880c78ccb8ccb6b340d5618d088c
Contents?: true
Size: 948 Bytes
Versions: 8
Compression:
Stored size: 948 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
8 entries across 8 versions & 1 rubygems