Created
March 20, 2011 10:46
-
-
Save vjt/878262 to your computer and use it in GitHub Desktop.
Applies to sass-3.1.0.alpha.221. Make the closing curly braces stand on their own line. - [email protected]
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- lib/sass/tree/visitors/convert.rb.orig 2011-03-20 05:32:23.000000000 +0100 | |
+++ lib/sass/tree/visitors/convert.rb 2011-03-14 14:57:45.000000000 +0100 | |
@@ -21,7 +21,7 @@ | |
def visit_children(parent) | |
@tabs += 1 | |
return @format == :sass ? "\n" : " {}\n" if parent.children.empty? | |
- (@format == :sass ? "\n" : " {\n") + super.join.rstrip + (@format == :sass ? "\n" : " }\n") | |
+ (@format == :sass ? "\n" : " {\n") + super.join.rstrip + (@format == :sass ? "\n" : "\n#{' '*((@tabs-1)*2)}}\n") | |
ensure | |
@tabs -= 1 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
For that matter, have a look at
tree/visitors/to_css.rb
, around line 67 - precisely thevisit_directive
method.I'd use
ruby-debug
, by adding adebugger
directive right after the tworeturn
statements and step through the code in order to better understand and change it. But from a quick look it seems that the change to implement what you're looking for should be located at line 73.Have fun :-)
~Marcello