Created
January 23, 2022 00:26
-
-
Save xanderificnl/e31ac304a0e70cccb782d58fce3277cd to your computer and use it in GitHub Desktop.
Convert slim files to haml without Temple functions
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
# 0. Make a backup first. | |
# 1. Install slim2haml | |
gem install slim2haml | |
# 2. Use the line below to remove offending lines. | |
for i in $(find . -name '*.haml'); do sed -E 's/::Temple::Utils\.escape_html((.*))/\1/; s/\(\(//g; s/\)\)//g; s/(-|=) _slim_controls[[:digit:]] ?//g' -i "$i"; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment