1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

Fix doctype haml-spec

This commit is contained in:
Takashi Kokubun 2015-03-27 16:48:43 +09:00
parent caec06129a
commit 9475e17f9d
2 changed files with 3 additions and 3 deletions

View file

@ -28,12 +28,12 @@ module Hamlit
when :html4, :html5
[:newline]
else
[:static, "<?xml version='1.0' encoding='utf-8' ?>"]
[:multi, [:static, "<?xml version='1.0' encoding='utf-8' ?>"], [:static, "\n"]]
end
end
def doctype_tag(type)
[:html, :doctype, type.to_s]
[:multi, [:html, :doctype, type.to_s], [:static, "\n"]]
end
end
end

View file

@ -216,7 +216,7 @@ module Hamlit
end
def skip_newline?(ast)
SKIP_NEWLINE_EXPS.include?(ast.first)
SKIP_NEWLINE_EXPS.include?(ast.first) || (ast[0..1] == [:haml, :doctype])
end
def has_block?