Created
January 22, 2020 08:38
-
-
Save ejoubaud/ed4a7c7d7eb3919d559718cb2523a95c to your computer and use it in GitHub Desktop.
Slim to ERB (not perfect but good to get started)
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
# requires slim gem installed for slimrb, and brew install tidy-html5 | |
file_name=./app/views/errors/show.html.slim | |
slimrb --erb "$file_name" \ | |
| sed 's/::Temple::Utils\.escape_html((\(.*\))) %>/\1 %>/g' \ | |
| tidy -q -i \ | |
> ${file_name%.*}.erb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment