[TxMt] 'Validate Syntax' command not working...

plastichairdoo plastichairdoo at gmail.com
Wed Aug 25 09:15:21 UTC 2010

hello all - I have another issue - the 'Validate Syntax' command in the HTML bundle just returns a blank window.

here is the Ruby code from the command:

#!/usr/bin/env ruby -wKU
STDOUT.sync = true

page = STDIN.read
page.gsub!(/<\?(php|=).*?\?>|<%.*?%>/m, '')

open('|curl -sF uploaded_file=@-\;type=text/html http://validator.w3.org/check', 'r+') do |io|
 io << page; io.close_write
 while line = io.gets
   line.gsub!(/<\/title>/, '\&<base href="http://validator.w3.org/">')
   line.gsub!(/Line (\d+),? Column (\d+)/i) do
     "<a href='txmt://open?line=#$1&column=#{$2.to_i + 1}'>#$&</a>"
   puts line

this should be the original code as I wouldn't have knowingly altered it (my Ruby being non-existent).


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macromates.com/textmate/attachments/20100825/17945046/attachment.html>

More information about the textmate mailing list