haml-edge 2.3.31 → 2.3.32
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/buffer.rb +1 -1
- data/test/haml/engine_test.rb +5 -0
- metadata +2 -2
data/EDGE_GEM_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.32
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.32
|
data/lib/haml/buffer.rb
CHANGED
@@ -245,7 +245,7 @@ RUBY
|
|
245
245
|
# @return [Hash<String, String>] `to`, after being merged
|
246
246
|
def self.merge_attrs(to, from)
|
247
247
|
if to['id'] && from['id']
|
248
|
-
to['id'] << '_' << from.delete('id')
|
248
|
+
to['id'] << '_' << from.delete('id').to_s
|
249
249
|
elsif to['id'] || from['id']
|
250
250
|
from['id'] ||= to['id']
|
251
251
|
end
|
data/test/haml/engine_test.rb
CHANGED
@@ -112,6 +112,11 @@ class EngineTest < Test::Unit::TestCase
|
|
112
112
|
assert_equal("<div class='atlantis' style='ugly'></div>", render(".atlantis{:style => 'ugly'}").chomp)
|
113
113
|
end
|
114
114
|
|
115
|
+
def test_css_id_as_attribute_should_be_appended_with_underscore
|
116
|
+
assert_equal("<div id='my_id_1'></div>", render("#my_id{:id => '1'}").chomp)
|
117
|
+
assert_equal("<div id='my_id_1'></div>", render("#my_id{:id => 1}").chomp)
|
118
|
+
end
|
119
|
+
|
115
120
|
def test_ruby_code_should_work_inside_attributes
|
116
121
|
author = 'hcatlin'
|
117
122
|
assert_equal("<p class='3'>foo</p>", render("%p{:class => 1+2} foo").chomp)
|
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.32
|
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-09-
|
13
|
+
date: 2009-09-18 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|