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:
parent
df25c38fde
commit
163c3f51c1
3 changed files with 20 additions and 1 deletions
|
@ -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.
|
||||
|
|
|
@ -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>.
|
||||
|
|
|
@ -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"] {
|
||||
|
|
Loading…
Reference in a new issue