fix error

This commit is contained in:
chiu 2020-04-27 19:16:41 +08:00
parent e4fde46be0
commit ba56cef3f9
1 changed files with 1 additions and 1 deletions

View File

@ -46,7 +46,7 @@ all_template.each do |folder|
filename = folder+'partial/_head.html.erb'
texts = File.read(filename).force_encoding('UTF-8')
new_texts = texts.gsub(/<.*javascript_include_tag.*bootstrap.*>/,"<%= javascript_include_tag \"bootstrap.min\"%>")
new_texts = new_texts.gsub(/<.*javascript_include_tag.*jquery\.min.*>/,"<%= javascript_include_tag \"jquery.min\"%>")
new_texts = new_texts.gsub(/<.*javascript_include_tag.*\/jquery\.min.*>|<.*javascript_include_tag.*\/jquery-1\.11\.0\.min.*>/,"<%= javascript_include_tag \"jquery.min\"%>")
if texts != new_texts
File.open(filename,'w') do |f|
f.write new_texts