mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
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
4 changed files with 4 additions and 3 deletions
|
@ -45,7 +45,7 @@ module Sass::Tree
|
|||
end
|
||||
|
||||
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."
|
||||
end
|
||||
end
|
||||
|
|
|
@ -6,7 +6,7 @@ module Sass::Tree
|
|||
super(value[2..-1].strip, style)
|
||||
end
|
||||
|
||||
def to_s(parent_name = nil)
|
||||
def to_s(tabs = 0, parent_name = nil)
|
||||
unless @style == :compressed
|
||||
join_string = @style == :compact ? ' ' : "\n * "
|
||||
"/* #{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; }
|
||||
|
||||
#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 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; }
|
||||
|
|
|
@ -23,6 +23,7 @@ body
|
|||
:margin 0
|
||||
:background
|
||||
:image url(/images/global_logo.gif)
|
||||
/* Crazy nested comment
|
||||
:repeat no-repeat
|
||||
:text-indent -9999px
|
||||
.status
|
||||
|
|
Loading…
Add table
Reference in a new issue