Posted By

iloveitaly on 05/15/09


Tagged

css textmate validate w3


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

webstic


TextMate Local CSS Validation


 / Published in: Ruby
 

  1. #!/usr/bin/env ruby -wKU
  2.  
  3. scope = STDIN.read
  4. scope.gsub!(/< \/?style.*?>/, '')
  5.  
  6. open('|curl -sF file=@-\;type=text/css -F lang=en http://jigsaw.w3.org/css-validator/validator', 'r+') do |io|
  7. io < < scope
  8. io.close_write
  9.  
  10. while io.gets
  11. $_.gsub!(/<\/title>/, '\&')
  12. print $_
  13. end
  14. end

Report this snippet  

You need to login to post a comment.