Sha256: e7d896d6984d68b6a4995c7bf794e671bdc2ccf15a509b4079056332ec5c4bf2
Contents?: true
Size: 848 Bytes
Versions: 17
Compression:
Stored size: 848 Bytes
Contents
require 'sass/tree/node' module Sass::Tree class CommentNode < Node attr_accessor :lines attr_accessor :value attr_accessor :silent def initialize(value, silent) @lines = [] @value = value[2..-1].strip @silent = silent super() end def ==(other) self.class == other.class && value == other.value && silent == other.silent && lines == other.lines end def to_s(tabs = 0, parent_name = nil) return if invisible? spaces = ' ' * (tabs - 1) spaces + "/* " + ([value] + lines.map {|l| l.text}). map{|l| l.sub(%r{ ?\*/ *$},'')}.join(style == :compact ? ' ' : "\n#{spaces} * ") + " */" end def invisible? style == :compressed || @silent end protected def _perform(environment) return [] if @silent self end end end
Version data entries
17 entries across 17 versions & 2 rubygems