提交 c9182597 编写于 作者: A Aaron Patterson

reduce string append funcalls

上级 b45a90f9
......@@ -109,9 +109,9 @@ def find_templates(name, prefix, partial, details)
def query(path, exts, formats)
query = File.join(@path, path)
exts.each do |ext|
query << '{' << ext.map {|e| e && ".#{e}" }.join(',') << ',}'
end
query << exts.map { |ext|
"{#{ext.compact.map { |e| ".#{e}" }.join(',')},}"
}.join
query.gsub!(/\{\.html,/, "{.html,.text.html,")
query.gsub!(/\{\.text,/, "{.text,.text.plain,")
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册