Module: Hamlit::Parsers::Text
Instance Method Summary collapse
Methods included from Concerns::Error
#assert_scan!, #copmile_error!, #syntax_error, #syntax_error!
Instance Method Details
#parse_text(scanner, lstrip: false, escape: true, scan: nil, inline: true) ⇒ Object
8 9 10 11 12 13 14 15 |
# File 'lib/hamlit/parsers/text.rb', line 8 def parse_text(scanner, lstrip: false, escape: true, scan: nil, inline: true) reject_text_nesting! unless inline scanner.scan(scan) if scan text = (scanner.scan(/.+/) || '') text = text.lstrip if lstrip [:haml, :text, text, escape] end |