Created
October 23, 2008 20:41
-
-
Save mdarby/19195 to your computer and use it in GitHub Desktop.
Here is an Textmate snippet that allows you to easily convert HTML and ERB templates to Haml. It also re-converts certain characters back to their normal form after conversion (for some reason html2haml converts stuff like less-than signs and quotes to th
This file contains hidden or 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
#!/bin/sh | |
html2haml -r "$TM_FILEPATH" | sed 's/>/>/g' | sed 's/</</g' | sed 's/- end//g' | sed 's/"/"/g' | sed 's/&/\&/g' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment