haml-edge 2.3.86 → 2.3.87
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/EDGE_GEM_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/haml/precompiler.rb +3 -1
- data/test/haml/engine_test.rb +1 -0
- metadata +2 -2
data/EDGE_GEM_VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.3.
|
|
1
|
+
2.3.87
|
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
2.3.
|
|
1
|
+
2.3.87
|
data/lib/haml/precompiler.rb
CHANGED
|
@@ -82,7 +82,7 @@ module Haml
|
|
|
82
82
|
MID_BLOCK_KEYWORD_REGEX = /^-\s*(#{%w[else elsif rescue ensure when end].join('|')})\b/
|
|
83
83
|
|
|
84
84
|
# The Regex that matches a Doctype command.
|
|
85
|
-
DOCTYPE_REGEX = /(\d
|
|
85
|
+
DOCTYPE_REGEX = /(\d(?:\.\d)?)?[\s]*([a-z]*)/i
|
|
86
86
|
|
|
87
87
|
# The Regex that matches a literal string or symbol value
|
|
88
88
|
LITERAL_VALUE_REGEX = /:(\w*)|(["'])((?![\\#]|\2).|\\.)*\2/
|
|
@@ -857,6 +857,8 @@ END
|
|
|
857
857
|
if xhtml?
|
|
858
858
|
if version == "1.1"
|
|
859
859
|
'<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">'
|
|
860
|
+
elsif version == "5"
|
|
861
|
+
'<!DOCTYPE html>'
|
|
860
862
|
else
|
|
861
863
|
case type
|
|
862
864
|
when "strict"; '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">'
|
data/test/haml/engine_test.rb
CHANGED
|
@@ -734,6 +734,7 @@ HAML
|
|
|
734
734
|
def test_doctypes
|
|
735
735
|
assert_equal('<!DOCTYPE html>',
|
|
736
736
|
render('!!!', :format => :html5).strip)
|
|
737
|
+
assert_equal('<!DOCTYPE html>', render('!!! 5').strip)
|
|
737
738
|
assert_equal('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">',
|
|
738
739
|
render('!!! strict').strip)
|
|
739
740
|
assert_equal('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Frameset//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-frameset.dtd">',
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: haml-edge
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.3.
|
|
4
|
+
version: 2.3.87
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Nathan Weizenbaum
|
|
@@ -10,7 +10,7 @@ autorequire:
|
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
12
|
|
|
13
|
-
date: 2009-11-
|
|
13
|
+
date: 2009-11-20 00:00:00 -05:00
|
|
14
14
|
default_executable:
|
|
15
15
|
dependencies:
|
|
16
16
|
- !ruby/object:Gem::Dependency
|