lib/hamlit/parsers/text.rb in hamlit-1.5.4 vs lib/hamlit/parsers/text.rb in hamlit-1.5.5

- old
+ new

@@ -3,10 +3,11 @@ module Hamlit module Parsers module Text include Concerns::Error - def parse_text(scanner, lstrip: false, escape: true) + 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