Sha256: ac7a1077726eedfb494dca5cfca5c8c2a307f3ad03496c083c9eadb638a0cffb

Contents?: true

Size: 996 Bytes

Versions: 70

Compression:

Stored size: 996 Bytes

Contents

# -*- coding: utf-8 -*-

#
# 対象小説情報
# タイトル: デスマーチからはじまる異世界狂想曲
# 作者: 愛七ひろ
# URL: http://ncode.syosetu.com/n9902bn/
#
converter "n9902bn デスマーチからはじまる異世界狂想曲" do
  def before(io, text_type)
    super
  end

  def announce_line?(line)
    line =~ /^〉/
  end

  def after(io, text_type)
    buffer = StringIO.new
    just_before_line_is_announce = false
    io.each do |line|
      if announce_line?(line)
        unless just_before_line_is_announce
          if line.strip != ""
            buffer.puts
          end
        end
        just_before_line_is_announce = true
        buffer.puts "[#ゴシック体][#太字]#{line.rstrip}[#太字終わり][#ゴシック体終わり]"
      else
        if just_before_line_is_announce
          buffer.puts
        end
        just_before_line_is_announce = false
        buffer.puts line
      end
    end
    buffer
  end
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
narou-3.1.7 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.1.6 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.1.5 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.1.4 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.1.3 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.1.2 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.1.1 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.0.5.1 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.0.5 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.0.4 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.0.3 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.0.2 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.0.1 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.0.0 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-2.9.5 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-2.9.4 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-2.9.3.1 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-2.9.3 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-2.9.2 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-2.9.1 preset/ncode.syosetu.com/n9902bn/converter.rb