<commit_before>module Redcarpet
  module Render
    class ReVIEW < Base

      def initialize(render_extensions)
        super()
        @table_num = 0
        @table_id_prefix = "tbl"
      end

      def normal_text(text)
        text
      end

      def block_code(code, language)
        code_text = normal_text(code).chomp
        lang = ""
        if language
          lang = "#\@# lang: #{language}\n"
        end
        "\n#{lang}//emlist{\n#{code_text}\n//}\n"
      end

      def block_quote(quote)
        quote_text = normal_text(quote).chomp
        quote_text.gsub!(/\A\n\n/,'')
        "\n//quote{\n#{quote_text}\n//}\n"
      end

      def block_html(raw_html)
        html_text = raw_html.chomp
        warning = "XXX: BLOCK_HTML: YOU SHOULD REWRITE IT"
        "\n//emlist{\n#{warning}\n#{html_text}\n//}\n"
      end

      def hrule
        "\n//hr\n"
      end

      def codespan(code)
        "@<tt>{#{normal_text(code)}}"
      end

      def header(title, level)
        case level
        when 1
          "\n= #{title}\n"
        when 2
          "\n== #{title}\n"
        when 3
          "\n=== #{title}\n"
        when 4
          "\n==== #{title}\n"
        end
      end

      def table(header, body)
        @sep = nil
        header_text = ""
        if header
          header_text = "#{header}-----------------\n"
        end
        "//table[#{table_id()}][]{\n#{header_text}#{body}\n//}\n"
      end

      def table_row(content)
        @sep = nil
        content+"\n"
      end

      def table_cell(content, alignment)
        sep = @sep
        @sep = "\t"
        "#{sep}#{content}"
      end

      def image(link, title, alt_text)
        filename = File.basename(link,".*")
        "//image[#{filename}][#{alt_text}]{\n//}"
      end

      def autolink(link, link_type)
        "@<href>{#{link}}"
      end

      def link(link, title, content)
        "@<href>{#{link},#{content}}"
      end

      def double_emphasis(text)
        "@<strong>{#{text}}"<commit_msg>remove invalid record in table<commit_after>module Redcarpet
  module Render
    class ReVIEW < Base

      def initialize(render_extensions)
        super()
        @table_num = 0
        @table_id_prefix = "tbl"
      end

      def normal_text(text)
        text
      end

      def block_code(code, language)
        code_text = normal_text(code).chomp
        lang = ""
        if language
          lang = "#\@# lang: #{language}\n"
        end
        "\n#{lang}//emlist{\n#{code_text}\n//}\n"
      end

      def block_quote(quote)
        quote_text = normal_text(quote).chomp
        quote_text.gsub!(/\A\n\n/,'')
        "\n//quote{\n#{quote_text}\n//}\n"
      end

      def block_html(raw_html)
        html_text = raw_html.chomp
        warning = "XXX: BLOCK_HTML: YOU SHOULD REWRITE IT"
        "\n//emlist{\n#{warning}\n#{html_text}\n//}\n"
      end

      def hrule
        "\n//hr\n"
      end

      def codespan(code)
        "@<tt>{#{normal_text(code)}}"
      end

      def header(title, level)
        case level
        when 1
          "\n= #{title}\n"
        when 2
          "\n== #{title}\n"
        when 3
          "\n=== #{title}\n"
        when 4
          "\n==== #{title}\n"
        end
      end

      def table(header, body)
        @sep = nil
        header_text = ""
        if header
          header_text = "#{header}-----------------\n"
        end
        body.chomp!
        "//table[#{table_id()}][]{\n#{header_text}#{body}\n//}\n"
      end

      def table_row(content)
        @sep = nil
        content+"\n"
      end

      def table_cell(content, alignment)
        sep = @sep
        @sep = "\t"
        "#{sep}#{content}"
      end

      def image(link, title, alt_text)
        filename = File.basename(link,".*")
        "//image[#{filename}][#{alt_text}]{\n//}"
      end

      def autolink(link, link_type)
        "@<href>{#{link}}"
      end

      def link(link, title, content)
        "@<href>{#{link},#{content}}"
      end

      def double_emphasis(text)
        "@<strong>{#{text}}"
{'fraction_non_alphanumeric': 0.16588957055214723, 'fraction_numerical': 0.00245398773006135, 'mean_word_length': 1.5459088069956277, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 11, 'https://': 0, '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': '3842642', 'n_tokens_mistral': 1366, 'n_tokens_neox': 1355, 'n_words': 272}