mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix pattern to match various magic comment formats
This commit is contained in:
parent
49824e8ad6
commit
92bff2ebf1
1 changed files with 1 additions and 1 deletions
|
@ -17,7 +17,7 @@ module ActionView
|
|||
def compile(template)
|
||||
require 'erb'
|
||||
|
||||
magic = $1 if template.source =~ /\A(<%#.*coding:\s*(\S+)\s*-?%>)/
|
||||
magic = $1 if template.source =~ /\A(<%#.*coding[:=]\s*(\S+)\s*-?%>)/
|
||||
erb = "#{magic}<% __in_erb_template=true %>#{template.source}"
|
||||
::ERB.new(erb, nil, erb_trim_mode, '@output_buffer').src
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue