diff --git a/doc-src/SASS_CHANGELOG.md b/doc-src/SASS_CHANGELOG.md index 8fb816ad..ca218475 100644 --- a/doc-src/SASS_CHANGELOG.md +++ b/doc-src/SASS_CHANGELOG.md @@ -51,6 +51,14 @@ Several bug fixes and minor improvements have been made, including: * Displaying the expected strings as strings rather than regular expressions whenever possible. +## 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. diff --git a/lib/sass/engine.rb b/lib/sass/engine.rb index 225ff8ae..907b9eb1 100644 --- a/lib/sass/engine.rb +++ b/lib/sass/engine.rb @@ -108,7 +108,7 @@ module Sass MIXIN_INCLUDE_CHAR = ?+ # The regex that matches properties of the form name: prop. - PROPERTY_NEW_MATCHER = /^[^\s:"]+\s*[=:](\s|$)/ + PROPERTY_NEW_MATCHER = /^[^\s:"\[]+\s*[=:](\s|$)/ # The regex that matches and extracts data from # properties of the form name: prop. diff --git a/test/sass/engine_test.rb b/test/sass/engine_test.rb index aac3481b..080ad80c 100755 --- a/test/sass/engine_test.rb +++ b/test/sass/engine_test.rb @@ -758,6 +758,17 @@ foo { CSS end + def test_attribute_selector_with_spaces + assert_equal(<