<commit_before>Prawn::Font::AFM.instance_variable_set :@hide_m17n_warning, true

require 'prawn/icon'

module Asciidoctor
module Prawn
module Extensions
  include ::Prawn::Measurements
  include ::Asciidoctor::Pdf::Sanitizer
  include ::Asciidoctor::PdfCore::PdfObject

  IconSets = ['fa', 'fi', 'octicon', 'pf'].to_set
  MeasurementValueRx = /(\d+|\d*\.\d+)(in|mm|cm|px|pt)?$/
  InitialPageContent = %(q\n)

  # - :height is the height of a line
  # - :leading is spacing between adjacent lines
  # - :padding_top is half line spacing, plus any line_gap in the font
  # - :padding_bottom is half line spacing
  # - :final_gap determines whether a gap is added below the last line
  LineMetrics = ::Struct.new :height, :leading, :padding_top, :padding_bottom, :final_gap

  # Core

  # Retrieves the catalog reference data for the PDF.
  #
  def catalog
    state.store.root
  end

  # Measurements

  # Returns the width of the current page from edge-to-edge
  #
  def page_width
    page.dimensions[2]
  end

  # Returns the effective (writable) width of the page
  #
  def effective_page_width
    reference_bounds.width
  end

  # Returns the height of the current page from edge-to-edge
  #
  def page_height
    page.dimensions[3]
  end

  # Returns the effective (writable) height of the page
  #
  def effective_page_height
    reference_bounds.height<commit_msg>clarify return value of effective_page_height & effective_page_width<commit_after>Prawn::Font::AFM.instance_variable_set :@hide_m17n_warning, true

require 'prawn/icon'

module Asciidoctor
module Prawn
module Extensions
  include ::Prawn::Measurements
  include ::Asciidoctor::Pdf::Sanitizer
  include ::Asciidoctor::PdfCore::PdfObject

  IconSets = ['fa', 'fi', 'octicon', 'pf'].to_set
  MeasurementValueRx = /(\d+|\d*\.\d+)(in|mm|cm|px|pt)?$/
  InitialPageContent = %(q\n)

  # - :height is the height of a line
  # - :leading is spacing between adjacent lines
  # - :padding_top is half line spacing, plus any line_gap in the font
  # - :padding_bottom is half line spacing
  # - :final_gap determines whether a gap is added below the last line
  LineMetrics = ::Struct.new :height, :leading, :padding_top, :padding_bottom, :final_gap

  # Core

  # Retrieves the catalog reference data for the PDF.
  #
  def catalog
    state.store.root
  end

  # Measurements

  # Returns the width of the current page from edge-to-edge
  #
  def page_width
    page.dimensions[2]
  end

  # Returns the effective (writable) width of the page
  #
  # If inside a fixed-height bounding box, returns height of box.
  #
  def effective_page_width
    reference_bounds.width
  end

  # Returns the height of the current page from edge-to-edge
  #
  def page_height
    page.dimensions[3]
  end

  # Returns the effective (writable) height of the page
  #
  # If inside a fixed-height bounding box, returns width of box.
  #
  def effective_page_height
    reference_bounds.height
{'fraction_non_alphanumeric': 0.09366485013623978, 'fraction_numerical': 0.0027247956403269754, 'mean_word_length': 3.7756097560975608, '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': '7648973', 'n_tokens_mistral': 985, 'n_tokens_neox': 944, 'n_words': 296}