Created
February 25, 2011 00:37
-
-
Save niczak/843202 to your computer and use it in GitHub Desktop.
TextMate commands to escape/unescape quotes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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('\\"','"')} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
How would I use this in TextMate?