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.4.5 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.4.3 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.4.2 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.4.1 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.4.0 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.3.2 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.3.1 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.3.0 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.2.5.1 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.2.5 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.2.4 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.2.3 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.2.2 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.2.1 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.2.0.1 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.2.0 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.1.11 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.1.10 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.1.9 preset/ncode.syosetu.com/n9902bn/converter.rb
narou-3.1.8 preset/ncode.syosetu.com/n9902bn/converter.rb