<commit_before>module ReVIEW
  class WDPRESSBuilder < MARKDOWNBuilder
  end
end

require "review/wdpressbuilder/version"

require 'review/markdownbuilder'

module ReVIEW

  # https://github.com/naoya/md2inao
  class WDPRESSBuilder

    # @override
    def headline(level, label, caption)
      blank
      prefix = "#" * (level - 1)
      puts "#{prefix} #{caption}"
      blank
    end

    # @Override
    def paragraph(lines)
      p = lines.join
      unless /^　/ =~ p
        p = '　' + p
      end
      puts p
      blank
    end

    def inline_list(id)
      result = super
      @inline_list_seen ||= {}
      unless @inline_list_seen[result]
        @inline_list_seen[result] = true
        result = "**#{result}**"
      end
      result
    end

    def inline_img(id)
      result = super
      @inline_img_seen ||= {}
      unless @inline_img_seen[result]
        @inline_img_seen[result] = true
        result = "**#{result}**"
      end
      result
    end
<commit_msg>fix bold<commit_after>module ReVIEW
  class WDPRESSBuilder < MARKDOWNBuilder
  end
end

require "review/wdpressbuilder/version"

require 'review/markdownbuilder'

module ReVIEW

  # https://github.com/naoya/md2inao
  class WDPRESSBuilder

    # @override
    def headline(level, label, caption)
      blank
      prefix = "#" * (level - 1)
      puts "#{prefix} #{caption}"
      blank
    end

    # @Override
    def paragraph(lines)
      p = lines.join
      unless /^　/ =~ p
        p = '　' + p
      end
      puts p
      blank
    end

    def inline_list(id)
      result = super
      @inline_list_seen ||= {}
       unless @inline_list_seen["#{@chapter.number}.#{id}"]
        @inline_list_seen["#{@chapter.number}.#{id}"] = true
        result = "**#{result}**"
      end
      result
    end

    def inline_img(id)
      result = super
      "**#{result}**"
      @inline_img_seen ||= {}
      unless @inline_img_seen["#{@chapter.number}.#{id}"]
        @inline_img_seen["#{@chapter.number}.#{id}"] = true
        result = "**#{result}**"
      end
      result
    end

{'fraction_non_alphanumeric': 0.1289855072463768, 'fraction_numerical': 0.001932367149758454, 'mean_word_length': 2.1474164133738602, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4506058', 'n_tokens_mistral': 697, 'n_tokens_neox': 685, 'n_words': 146}