haml-edge 2.3.66 → 2.3.67
Sign up to get free protection for your applications and to get access to all the features.
- data/EDGE_GEM_VERSION +1 -1
- data/VERSION +1 -1
- data/lib/haml/precompiler.rb +7 -1
- data/test/haml/engine_test.rb +12 -0
- data/test/haml/results/tag_parsing.xhtml +1 -1
- metadata +3 -3
data/EDGE_GEM_VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.67
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.3.
|
1
|
+
2.3.67
|
data/lib/haml/precompiler.rb
CHANGED
@@ -476,7 +476,13 @@ END
|
|
476
476
|
attributes['class'] = ""
|
477
477
|
end
|
478
478
|
attributes['class'] += property
|
479
|
-
when '#'
|
479
|
+
when '#'
|
480
|
+
if attributes['id']
|
481
|
+
attributes['id'] += "_"
|
482
|
+
else
|
483
|
+
attributes['id'] = ""
|
484
|
+
end
|
485
|
+
attributes['id'] += property
|
480
486
|
end
|
481
487
|
end
|
482
488
|
attributes
|
data/test/haml/engine_test.rb
CHANGED
@@ -282,6 +282,18 @@ RESULT
|
|
282
282
|
SOURCE
|
283
283
|
end
|
284
284
|
|
285
|
+
def test_multiple_ids
|
286
|
+
assert_equal("<p id='bc_ab'></p>\n", render("%p#bc#ab"))
|
287
|
+
assert_equal("<p id='ab_bc'></p>\n", render("%p#ab#bc"))
|
288
|
+
assert_equal("<p id='ab'></p>\n", render("%p(id='bc' id='ab')"))
|
289
|
+
assert_equal("<p id='bc'></p>\n", render("%p(id='ab' id='bc')"))
|
290
|
+
assert_equal("<p id='bc_ab'></p>\n", render("%p#bc(id='ab')"))
|
291
|
+
assert_equal("<p id='ab_bc'></p>\n", render("%p#ab(id='bc')"))
|
292
|
+
assert_equal("<p id='bc_ab'></p>\n", render("%p#bc{:id => 'ab'}"))
|
293
|
+
assert_equal("<p id='ab_bc'></p>\n", render("%p#ab{:id => 'bc'}"))
|
294
|
+
assert_equal("<p id='ab_bc_cd'></p>\n", render("%p#ab{:id => 'bc'}(id='cd')"))
|
295
|
+
end
|
296
|
+
|
285
297
|
# Regression tests
|
286
298
|
|
287
299
|
def test_whitespace_nuke_with_both_newlines
|
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.67
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Weizenbaum
|
@@ -44,9 +44,9 @@ extensions: []
|
|
44
44
|
|
45
45
|
extra_rdoc_files:
|
46
46
|
- README.md
|
47
|
+
- REVISION
|
47
48
|
- VERSION
|
48
49
|
- VERSION_NAME
|
49
|
-
- REVISION
|
50
50
|
- CONTRIBUTING
|
51
51
|
- MIT-LICENSE
|
52
52
|
- EDGE_GEM_VERSION
|
@@ -262,9 +262,9 @@ files:
|
|
262
262
|
- init.rb
|
263
263
|
- .yardopts
|
264
264
|
- README.md
|
265
|
+
- REVISION
|
265
266
|
- VERSION
|
266
267
|
- VERSION_NAME
|
267
|
-
- REVISION
|
268
268
|
- CONTRIBUTING
|
269
269
|
- MIT-LICENSE
|
270
270
|
- EDGE_GEM_VERSION
|