<commit_before>module Nokogiri
  module XML
    class Element

      # The node's font size
      # Used for guessing heading sizes
      #
      # Returns a float with the font-size
      def font_size
        if styles['font-size']
          styles['font-size'].to_f
        else
          12.to_f
        end
      end

      def bold?
        styles['font-weight'] && styles['font-weight'] == "bold"
      end

      def italic?
        styles['font-style'] && styles['font-style'] == "italic"
      end
    end
  end<commit_msg>abstract default font size a bit<commit_after>module Nokogiri
  module XML
    class Element

      DEFAULT_FONT_SIZE = 12.to_f

      # The node's font size
      # Used for guessing heading sizes
      #
      # Returns a float with the font-size
      def font_size
        styles['font-size'] ? styles['font-size'].to_f : DEFAULT_FONT_SIZE
      end

      def bold?
        styles['font-weight'] && styles['font-weight'] == "bold"
      end

      def italic?
        styles['font-style'] && styles['font-style'] == "italic"
      end
    end
  end
{'fraction_non_alphanumeric': 0.10405156537753223, 'fraction_numerical': 0.003683241252302026, 'mean_word_length': 1.9457994579945799, 'pattern_counts': {'":': 0, '<': 3, '<?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': '212942', 'n_tokens_mistral': 336, 'n_tokens_neox': 319, 'n_words': 91}