Drop format mutation

This commit is contained in:
Takashi Kokubun 2015-11-13 23:10:31 +09:00
parent a051bd8893
commit f5df74a37d
2 changed files with 5 additions and 8 deletions

View File

@ -22,10 +22,14 @@ module Hamlit
def html_doctype(node)
return [:html, :doctype, @html_type] if @html_type
version = node.value[:version] || 'transitional'
version = node.value[:version] || :transitional
case @format
when :xhtml
[:html, :doctype, version]
when :html4
[:html, :doctype, :transitional]
when :html5
[:html, :doctype, :html]
else
[:html, :doctype, @format]
end

View File

@ -55,13 +55,6 @@ module Hamlit
def temple_options
@options.dup.tap do |options|
options.delete(:ugly)
case options[:format]
when :html5
options[:format] = :html
when :html4
options[:format] = :html
options[:html_type] = 'transitional'
end
end
end