1
0
Fork 0
mirror of https://github.com/haml/haml.git synced 2022-11-09 12:33:31 -05:00

[Sass] Support attribute selectors with spaces around the =.

This commit is contained in:
Nathan Weizenbaum 2009-10-21 13:49:57 -07:00
parent df25c38fde
commit 163c3f51c1
3 changed files with 20 additions and 1 deletions

View file

@ -3,6 +3,14 @@
* Table of contents
{:toc}
## 2.2.10 (Unreleased)
* Add support for attribute selectors with spaces around the `=`.
For example:
a[href = http://google.com]
color: blue
## [2.2.9](http://github.com/nex3/haml/commit/2.2.9)
There were no changes made to Sass between versions 2.2.8 and 2.2.9.

View file

@ -107,7 +107,7 @@ module Sass
MIXIN_INCLUDE_CHAR = ?+
# The regex that matches properties of the form <tt>name: prop</tt>.
PROPERTY_NEW_MATCHER = /^[^\s:"]+\s*[=:](\s|$)/
PROPERTY_NEW_MATCHER = /^[^\s:"\[]+\s*[=:](\s|$)/
# The regex that matches and extracts data from
# properties of the form <tt>name: prop</tt>.

View file

@ -673,6 +673,17 @@ foo {
CSS
end
def test_attribute_selector_with_spaces
assert_equal(<<CSS, render(<<SASS))
a b[foo = bar] {
c: d; }
CSS
a
b[foo = bar]
c: d
SASS
end
def test_quoted_colon
assert_equal(<<CSS, render(<<SASS))
a b[foo="bar: baz"] {