lib/sproutcore/cssmin.rb
# Remove all comments out of the CSS-Document
Remove all comments out of the CSS-Document
Remove all comments out of the CSS - Document
def remove_comments(script)
      input = script
      script = ''
      while input.length > 0 do
        pos = input.index("/*");
        if pos == nil
          script += input
          input = '';
        else 
          script += input[0..(pos-1)] if pos > 0 
          input = input[(pos+2)..-1]
          pos = input.index("*/")
          input = input[(pos+2)..-1]
        end
      end
  		script
  	end
def remove_comments ( script ) input = script script = '' while input . length > 0 do pos = input . index ( "/*" ) ; if pos == nil script += input input = '' ; else script += input [ 0 .. ( pos - 1 ) ] if pos > 0 input = input [ ( pos + 2 ) .. - 1 ] pos = input . index ( "*/" ) input = input [ ( pos + 2 ) .. - 1 ] end end script end
Remove all comments out of the CSS-Document
Remove all comments out of the CSS - Document
# No more comments # Comment beginning at pos # only append text if there is some # Comment ending at pos # return
script
<not_specific>