css_parser icon indicating copy to clipboard operation
css_parser copied to clipboard

Striping comments

Open zz9pzza opened this issue 11 years ago • 0 comments

Is it possible to configure the gem not to strip comments ?

1.9.3-p448 :001 > parser = CssParser::Parser.new =>
1.9.3-p448 :002 > parser.add_block!(" 1.9.3-p448 :003"> /* my css / 1.9.3-p448 :004"> body { / hello world */ 1.9.3-p448 :005"> background: yellow; 1.9.3-p448 :006"> }") => nil 1.9.3-p448 :007 > parser.each_rule_set do |rs| 1.9.3-p448 :008 > puts rs 1.9.3-p448 :009?> end body { background: yellow; } => [{:media_types=>[:all], :rules=>body { background: yellow; }}]

zz9pzza avatar Dec 30 '14 09:12 zz9pzza