Skip to content

Instantly share code, notes, and snippets.

@niczak
Created February 25, 2011 00:37
Show Gist options
  • Save niczak/843202 to your computer and use it in GitHub Desktop.
Save niczak/843202 to your computer and use it in GitHub Desktop.
TextMate commands to escape/unescape quotes.
#!/usr/bin/env ruby
/* Thanks to @TextMateUser for help with this. */
/* Escape quotes */
puts STDIN.readlines.collect{|line| line.gsub('"','\\"')}
/* Remove escaping */
puts STDIN.readlines.collect{|line| line.gsub('\\"','"')}
@below
Copy link

below commented Aug 21, 2019

How would I use this in TextMate?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment