Merge branch 'stable'
This commit is contained in:
commit
14a4f8013a
|
@ -127,6 +127,8 @@ including the line number and the offending character.
|
|||
* Don't print warnings when escaping attributes containing non-ASCII characters
|
||||
in Ruby 1.9.
|
||||
|
||||
* Don't crash when parsing an XHTML Strict doctype in `html2haml`.
|
||||
|
||||
## [2.2.13](http://github.com/nex3/haml/commit/2.2.13)
|
||||
|
||||
* Allow users to specify {file:HAML_REFERENCE.md#encoding_option `:encoding => "ascii-8bit"`}
|
||||
|
|
|
@ -195,10 +195,7 @@ module Haml
|
|||
end
|
||||
|
||||
version = " #{version}" if version
|
||||
if strictness
|
||||
strictness[0] = strictness[0] - 32
|
||||
strictness = " #{strictness}"
|
||||
end
|
||||
strictness = " #{strictness.capitalize}" if strictness
|
||||
|
||||
"#{tabulate(tabs)}!!!#{version}#{strictness}\n"
|
||||
end
|
||||
|
|
|
@ -247,6 +247,15 @@ HTML
|
|||
end
|
||||
end
|
||||
|
||||
# Regression Tests
|
||||
|
||||
def test_xhtml_strict_doctype
|
||||
assert_equal('!!! Strict', render(<<HTML))
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
HTML
|
||||
end
|
||||
|
||||
protected
|
||||
|
||||
def render(text, options = {})
|
||||
|
|
Loading…
Reference in New Issue