Allow loud comments to appear beneath nested attributes. Thanks to Hrvoje Marjanovic for pointing this out.
git-svn-id: svn://hamptoncatlin.com/haml/trunk@683 7063305b-7217-0410-af8c-cdc13e5119b9
This commit is contained in:
parent
8143e161f2
commit
b9bf614f6c
|
@ -45,7 +45,7 @@ module Sass::Tree
|
||||||
end
|
end
|
||||||
|
|
||||||
def invalid_child?(child)
|
def invalid_child?(child)
|
||||||
if !child.is_a?(AttrNode)
|
if !child.is_a?(AttrNode) && !child.is_a?(CommentNode)
|
||||||
"Illegal nesting: Only attributes may be nested beneath attributes."
|
"Illegal nesting: Only attributes may be nested beneath attributes."
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -6,7 +6,7 @@ module Sass::Tree
|
||||||
super(value[2..-1].strip, style)
|
super(value[2..-1].strip, style)
|
||||||
end
|
end
|
||||||
|
|
||||||
def to_s(parent_name = nil)
|
def to_s(tabs = 0, parent_name = nil)
|
||||||
unless @style == :compressed
|
unless @style == :compressed
|
||||||
join_string = @style == :compact ? ' ' : "\n * "
|
join_string = @style == :compact ? ' ' : "\n * "
|
||||||
"/* #{value}#{join_string unless children.empty?}#{children.join join_string} */"
|
"/* #{value}#{join_string unless children.empty?}#{children.join join_string} */"
|
||||||
|
|
|
@ -3,7 +3,7 @@ body { margin: 0; font: 0.85em "Lucida Grande", "Trebuchet MS", Verdana, sans-se
|
||||||
#page { width: 900px; margin: 0 auto; background: #440008; border-top-width: 5px; border-top-style: solid; border-top-color: #ff8500; }
|
#page { width: 900px; margin: 0 auto; background: #440008; border-top-width: 5px; border-top-style: solid; border-top-color: #ff8500; }
|
||||||
|
|
||||||
#header { height: 75px; padding: 0; }
|
#header { height: 75px; padding: 0; }
|
||||||
#header h1 { float: left; width: 274px; height: 75px; margin: 0; background-image: url(/images/global_logo.gif); background-repeat: no-repeat; text-indent: -9999px; }
|
#header h1 { float: left; width: 274px; height: 75px; margin: 0; background-image: url(/images/global_logo.gif); /* Crazy nested comment */ background-repeat: no-repeat; text-indent: -9999px; }
|
||||||
#header .status { float: right; padding-top: .5em; padding-left: .5em; padding-right: .5em; padding-bottom: 0; }
|
#header .status { float: right; padding-top: .5em; padding-left: .5em; padding-right: .5em; padding-bottom: 0; }
|
||||||
#header .status p { float: left; margin-top: 0; margin-right: 0.5em; margin-bottom: 0; margin-left: 0; }
|
#header .status p { float: left; margin-top: 0; margin-right: 0.5em; margin-bottom: 0; margin-left: 0; }
|
||||||
#header .status ul { float: left; margin: 0; padding: 0; }
|
#header .status ul { float: left; margin: 0; padding: 0; }
|
||||||
|
|
|
@ -23,6 +23,7 @@ body
|
||||||
:margin 0
|
:margin 0
|
||||||
:background
|
:background
|
||||||
:image url(/images/global_logo.gif)
|
:image url(/images/global_logo.gif)
|
||||||
|
/* Crazy nested comment
|
||||||
:repeat no-repeat
|
:repeat no-repeat
|
||||||
:text-indent -9999px
|
:text-indent -9999px
|
||||||
.status
|
.status
|
||||||
|
|
Loading…
Reference in New Issue