forked from FG42/FG42
1
0
Fork 0

erbify-image-path function added to ruby extension

This commit is contained in:
Sameer Rahmani 2016-12-12 11:31:15 +03:30
parent c427ef945d
commit a02ccae825
1 changed files with 9 additions and 0 deletions

View File

@ -117,4 +117,13 @@
(build-ctag-file))
(etags-select-find-tag-at-point))
(setq erb-regex (concat "\\([^\\\"']+\\.\\)\\(" (rx (or "jpg" "png" "gif" "svg")) "\\)"))
;;;###autoload
(defun erbify-image-paths ()
(interactive)
(message erb-regex)
(replace-regexp erb-regex "<%= image_path '\\1\\2' %>"))
(provide 'extensions/ruby/setup)