class Sass::Tree::Visitors::Convert
def visit_comment(node)
def visit_comment(node) value = node.value.map do |r| next r if r.is_a?(String) "\#{#{r.to_sass(@options)}}" end.join content = if @format == :sass content = value.gsub(/\*\/$/, '').rstrip if content =~ /\A[ \t]/ # Re-indent SCSS comments like this: # /* foo # bar # baz */ content.gsub!(/^/, ' ') content.sub!(/\A([ \t]*)\/\*/, '/*\1') end content = unless content.include?("\n") content else content.gsub!(/\n( \*|\/\/)/, "\n ") spaces = content.scan(/\n( *)/).map {|s| s.first.size}.min sep = node.type == :silent ? "\n//" : "\n *" if spaces >= 2 content.gsub(/\n /, sep) else content.gsub(/\n#{' ' * spaces}/, sep) end end content.gsub!(/\A\/\*/, '//') if node.type == :silent content.gsub!(/^/, tab_str) content.rstrip + "\n" else spaces = (' ' * [@tabs - value[/^ */].size, 0].max) content = if node.type == :silent value.gsub(/^[\/ ]\*/, '//').gsub(/ *\*\/$/, '') else value end.gsub(/^/, spaces) + "\n" content end content.sub!(%r{^\s*(/\*)}, '/*!') if node.type == :loud content end