Module: Hamlit::Parsers::Doctype
- Included in:
- Hamlit::Parser
- Defined in:
- lib/hamlit/parsers/doctype.rb
Instance Method Summary collapse
Instance Method Details
#parse_doctype(scanner) ⇒ Object
6 7 8 9 10 11 12 13 14 15 |
# File 'lib/hamlit/parsers/doctype.rb', line 6 def parse_doctype(scanner) assert_scan!(scanner, /!!!/) type = nil if scanner.scan(/ +/) && scanner.rest? type = scanner.rest.strip end [:haml, :doctype, [:format], type] end |