mirror of
https://github.com/haml/haml.git
synced 2022-11-09 12:33:31 -05:00
[Sass] Retrofit some comment parsing and tests to fit the new comment stuff.
This commit is contained in:
parent
9a01a63fa0
commit
ccb8081264
3 changed files with 10 additions and 4 deletions
|
@ -524,9 +524,15 @@ WARNING
|
|||
|
||||
def format_comment_text(text)
|
||||
content = text.split("\n")
|
||||
|
||||
if content.first && content.first.strip.empty?
|
||||
removed_first = true
|
||||
content.shift
|
||||
end
|
||||
|
||||
return "/* */" if content.empty?
|
||||
content.map! {|l| (l.empty? ? "" : " ") + l}
|
||||
content.first.gsub!(/^ /, '')
|
||||
content.first.gsub!(/^ /, '') unless removed_first
|
||||
content.last.gsub!(%r{ ?\*/ *$}, '')
|
||||
"/*" + content.join("\n *") + " */"
|
||||
end
|
||||
|
|
|
@ -117,8 +117,8 @@ span.turkey
|
|||
|
||||
#overhere
|
||||
bored: sorta
|
||||
/* it's for a good
|
||||
cause
|
||||
/* it's for a good
|
||||
cause
|
||||
better_than: thread_pools
|
||||
|
||||
#one_more
|
||||
|
|
|
@ -1077,7 +1077,7 @@ SOURCE
|
|||
RESULT
|
||||
.box
|
||||
:border
|
||||
/*:color black
|
||||
/* :color black
|
||||
:style solid
|
||||
SOURCE
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue