<commit_before># frozen_string_literal: true

require 'ruby-enum'
module CommonMarker
  # For Ruby::Enum, these must be classes, not modules
  module Config
    class Parse
      include Ruby::Enum

      define :DEFAULT, 0
      define :VALIDATE_UTF8, (1 << 9)
      define :SMART, (1 << 10)
      define :LIBERAL_HTML_TAG, (1 << 12)
      define :FOOTNOTES, (1 << 13)
      define :STRIKETHROUGH_DOUBLE_TILDE, (1 << 14)
      define :UNSAFE, (1 << 17)
    end

    class Render
      include Ruby::Enum

      define :DEFAULT, 0
      define :SOURCEPOS, (1 << 1)
      define :HARDBREAKS, (1 << 2)
      define :NOBREAKS, (1 << 4)
      define :GITHUB_PRE_LANG, (1 << 11)
      define :TABLE_PREFER_STYLE_ATTRIBUTES, (1 << 15)
      define :FULL_INFO_STRING, (1 << 16)
      define :UNSAFE, (1 << 17)
    end

    def self.process_options(option, type)
      type = Config.const_get(type.capitalize)
      if option.is_a?(Symbol)
        check_option(option, type)
        type.to_h[option]
      elsif option.is_a?(Array)
        option = [nil] if option.empty?<commit_msg>add :FOOTNOTE option for rendering footnotes<commit_after># frozen_string_literal: true

require 'ruby-enum'
module CommonMarker
  # For Ruby::Enum, these must be classes, not modules
  module Config
    class Parse
      include Ruby::Enum

      define :DEFAULT, 0
      define :VALIDATE_UTF8, (1 << 9)
      define :SMART, (1 << 10)
      define :LIBERAL_HTML_TAG, (1 << 12)
      define :FOOTNOTES, (1 << 13)
      define :STRIKETHROUGH_DOUBLE_TILDE, (1 << 14)
      define :UNSAFE, (1 << 17)
    end

    class Render
      include Ruby::Enum

      define :DEFAULT, 0
      define :SOURCEPOS, (1 << 1)
      define :HARDBREAKS, (1 << 2)
      define :NOBREAKS, (1 << 4)
      define :GITHUB_PRE_LANG, (1 << 11)
      define :TABLE_PREFER_STYLE_ATTRIBUTES, (1 << 15)
      define :FULL_INFO_STRING, (1 << 16)
      define :UNSAFE, (1 << 17)
      define :FOOTNOTES, (1 << 13)
    end

    def self.process_options(option, type)
      type = Config.const_get(type.capitalize)
      if option.is_a?(Symbol)
        check_option(option, type)
        type.to_h[option]
      elsif option.is_a?(Array)
        option = [nil] if option.empty?
{'fraction_non_alphanumeric': 0.11767357980162309, 'fraction_numerical': 0.035617673579801626, 'mean_word_length': 2.6317512274959083, 'pattern_counts': {'":': 0, '<': 57, '<?xml version=': 0, '>': 3, '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': '6688173', 'n_tokens_mistral': 835, 'n_tokens_neox': 770, 'n_words': 210}