Revert "[Haml] Support concatenating multiple CSS-syntax ids using _."
This reverts commit 5aa2cd6992
.
Conflicts:
doc-src/HAML_CHANGELOG.md
This commit is contained in:
parent
add68bb641
commit
5c838a9ef5
|
@ -21,12 +21,6 @@
|
|||
but it shouldn't have too much effect and the optimizations
|
||||
will hopefully be re-enabled in version 2.4.
|
||||
|
||||
* Allow multiple ids to be used on the same element.
|
||||
They will be concatenated together with an underscore.
|
||||
For example, `%p#foo#bar` will become `<p id="foo_bar">`.
|
||||
This is consistent with the behavior of multiple ids
|
||||
when one is specified as a standard attribute.
|
||||
|
||||
* Don't crash if the plugin skeleton is installed and `rake gems:install` is run.
|
||||
|
||||
## [2.2.10](http://github.com/nex3/haml/commit/2.2.10)
|
||||
|
|
|
@ -479,13 +479,7 @@ END
|
|||
attributes['class'] = ""
|
||||
end
|
||||
attributes['class'] += property
|
||||
when '#'
|
||||
if attributes['id']
|
||||
attributes['id'] += "_"
|
||||
else
|
||||
attributes['id'] = ""
|
||||
end
|
||||
attributes['id'] += property
|
||||
when '#'; attributes['id'] = property
|
||||
end
|
||||
end
|
||||
attributes
|
||||
|
|
|
@ -278,18 +278,6 @@ RESULT
|
|||
SOURCE
|
||||
end
|
||||
|
||||
def test_multiple_ids
|
||||
assert_equal("<p id='bc_ab'></p>\n", render("%p#bc#ab"))
|
||||
assert_equal("<p id='ab_bc'></p>\n", render("%p#ab#bc"))
|
||||
assert_equal("<p id='ab'></p>\n", render("%p(id='bc' id='ab')"))
|
||||
assert_equal("<p id='bc'></p>\n", render("%p(id='ab' id='bc')"))
|
||||
assert_equal("<p id='bc_ab'></p>\n", render("%p#bc(id='ab')"))
|
||||
assert_equal("<p id='ab_bc'></p>\n", render("%p#ab(id='bc')"))
|
||||
assert_equal("<p id='bc_ab'></p>\n", render("%p#bc{:id => 'ab'}"))
|
||||
assert_equal("<p id='ab_bc'></p>\n", render("%p#ab{:id => 'bc'}"))
|
||||
assert_equal("<p id='ab_bc_cd'></p>\n", render("%p#ab{:id => 'bc'}(id='cd')"))
|
||||
end
|
||||
|
||||
# Regression tests
|
||||
|
||||
def test_whitespace_nuke_with_both_newlines
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
<foo2u>11</foo2u>
|
||||
</div>
|
||||
<div class='classes'>
|
||||
<p class='foo bar' id='baz_boom'></p>
|
||||
<p class='foo bar' id='boom'></p>
|
||||
<div class='fooBar'>a</div>
|
||||
<div class='foo-bar'>b</div>
|
||||
<div class='foo_bar'>c</div>
|
||||
|
|
Loading…
Reference in New Issue