Sha256: c575faac4937c4ffeccc69f46370924667289999e2d0a7469fb6604717f2532c

Contents?: true

Size: 360 Bytes

Versions: 9

Compression:

Stored size: 360 Bytes

Contents

require 'hamlit/concerns/error'

module Hamlit
  module Parsers
    module Text
      include Concerns::Error

      def parse_text(scanner, lstrip: false, escape: true, scan: nil)
        scanner.scan(scan) if scan
        text = (scanner.scan(/.+/) || '')
        text = text.lstrip if lstrip
        [:haml, :text, text, escape]
      end
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
hamlit-1.6.3 lib/hamlit/parsers/text.rb
hamlit-1.6.2 lib/hamlit/parsers/text.rb
hamlit-1.6.1 lib/hamlit/parsers/text.rb
hamlit-1.6.0 lib/hamlit/parsers/text.rb
hamlit-1.5.9 lib/hamlit/parsers/text.rb
hamlit-1.5.8 lib/hamlit/parsers/text.rb
hamlit-1.5.7 lib/hamlit/parsers/text.rb
hamlit-1.5.6 lib/hamlit/parsers/text.rb
hamlit-1.5.5 lib/hamlit/parsers/text.rb