[SVN] Strip HTML tags also Strips embedded ruby tags

Brad Hodges brad at tvdco.com
Sat Dec 17 20:03:32 UTC 2011


New to Textmate

I just gave the Strip HTML tags command a try.

I develop Ruby on Rails,  so I also have embedded ruby

The command also stripped out the embedded Ruby.  I want to keep the embedded Ruby and just strip the HTML.

When I go into the command editor, I see that the command is acheived via php

-- snip--
## Strip HTML and PHP tags from the selected text
php -r 'echo strip_tags( file_get_contents("/dev/stdin") );'

###  If you want to keep a particular tag, such as <p> comment the above line and uncomment the next line
# php -r 'echo strip_tags( file_get_contents("/dev/stdin"), "<p>" );'
### end
-- snip--

OK,  my first inclination is to uncomment the second command and put '<%' or '<%%>',  but I kind of doubt that will work,  as embedded ruby isn't really structured like HTML.  

My second inclination was to try and find that script and see if I could modify it.   I'm on OSX 10.7.2,  and the documents I've found describing where that script might be are not accurate for my environment.

So here's my questions

Any commands that will strip out HTML but leave embedded Ruby?

Where can I find the strip_tags script on OSX 10.7.2 ?

Thanks!



 


More information about the textmate-dev mailing list