Permalink
Browse files

Use magic comment that works with ERB.

  • Loading branch information...
airblade committed Nov 15, 2012
1 parent e07a07e commit 157660a749cd9c0da1dcb1fc1226eecffe9c52e7
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/magic_encoding.rb
View
@@ -13,15 +13,15 @@ def self.process(options)
encoding = options[0] || "utf-8"
directory = options[1] || Dir.pwd
- magic_comment = "-*- encoding : #{encoding} -*-"
+ magic_comment = "encoding: #{encoding}"
# TODO : add options for recursivity (and application of the script to a single file)
extensions = {
'rb' => '# {text}',
'rake' => '# {text}',
'haml' => '-# {text}',
- 'erb' => '<%# {text} %>',
+ 'erb' => '<%# {text} -%>',
}
count = 0

0 comments on commit 157660a

Please sign in to comment.