mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
css2sass doesn't get confused by CSS rules starting with . or #
This caused it to trip up on stuff like .a.b .c { a: b } .a.b .d { a: b }
This commit is contained in:
parent
562a89e200
commit
5a6d99b830
1 changed files with 1 additions and 1 deletions
|
@ -266,7 +266,7 @@ module Sass
|
|||
rules = OrderedHash.new
|
||||
root.children.select { |c| Tree::RuleNode === c }.each do |child|
|
||||
root.children.delete child
|
||||
first, rest = child.rule.scan(/^(&?.[^.#: \[]*)([.#: \[].*)?$/).first
|
||||
first, rest = child.rule.scan(/^(&?(?: .|[^ ])[^.#: \[]*)([.#: \[].*)?$/).first
|
||||
rules[first] ||= Tree::RuleNode.new(first, nil)
|
||||
if rest
|
||||
child.rule = "&" + rest
|
||||
|
|
Loading…
Add table
Reference in a new issue