Sha256: af863aa157f322215d2b94de8dcc8daa7d39778aa7de97a051aed74a5324613b

Contents?: true

Size: 314 Bytes

Versions: 7

Compression:

Stored size: 314 Bytes

Contents

require 'hamlit/concerns/error'

module Hamlit
  module Parsers
    module Text
      include Concerns::Error

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

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
hamlit-1.5.4 lib/hamlit/parsers/text.rb
hamlit-1.5.3 lib/hamlit/parsers/text.rb
hamlit-1.5.2 lib/hamlit/parsers/text.rb
hamlit-1.5.1 lib/hamlit/parsers/text.rb
hamlit-1.5.0 lib/hamlit/parsers/text.rb
hamlit-1.4.7 lib/hamlit/parsers/text.rb
hamlit-1.4.6 lib/hamlit/parsers/text.rb