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.
@@ -1 +1 @@
1
- 2.3.66
1
+ 2.3.67
data/VERSION CHANGED
@@ -1 +1 @@
1
- 2.3.66
1
+ 2.3.67
@@ -476,7 +476,13 @@ END
476
476
  attributes['class'] = ""
477
477
  end
478
478
  attributes['class'] += property
479
- when '#'; attributes['id'] = property
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
@@ -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
@@ -12,7 +12,7 @@
12
12
  <foo2u>11</foo2u>
13
13
  </div>
14
14
  <div class='classes'>
15
- <p class='foo bar' id='boom'></p>
15
+ <p class='foo bar' id='baz_boom'></p>
16
16
  <div class='fooBar'>a</div>
17
17
  <div class='foo-bar'>b</div>
18
18
  <div class='foo_bar'>c</div>
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.66
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