Revert "[Haml] Support concatenating multiple CSS-syntax ids using _."

This reverts commit 5aa2cd6992.

Conflicts:

	doc-src/HAML_CHANGELOG.md
This commit is contained in:
Nathan Weizenbaum 2009-11-05 18:38:27 -08:00
parent add68bb641
commit 5c838a9ef5
4 changed files with 2 additions and 26 deletions

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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>