Sha256: bdca060d8df354eaf0f6297e60fa1b2b659c1101cd8272f18f797999a69a1ee4

Contents?: true

Size: 571 Bytes

Versions: 1

Compression:

Stored size: 571 Bytes

Contents

# frozen_string_literal: true

require 'pdf/core/text'
require 'prawn/rtl/support/version'
require 'prawn/rtl/connector'

module Prawn
  module Rtl
    module Support
      module PrawnTextPatch
        def original_text
          super.map do |h|
            if h.key?(:text)
              h[:text] = Prawn::Rtl::Connector.fix_rtl(h[:text])
            end
            h
          end
        end
      end
    end
  end
end

module Prawn
  module Text
    module Formatted
      class Box
        prepend Prawn::Rtl::Support::PrawnTextPatch
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
prawn-rtl-support-0.1.7 lib/prawn/rtl/support.rb