Verified Commit 5e11ac76 authored by Aral Balkan's avatar Aral Balkan
Browse files

Refactor partials regex so it is initiatlised just once

parent 001a2099
......@@ -36,6 +36,8 @@ set = (fs.readFileSync __dirname + '/set.js', 'utf8').toString()
partialsCache = {}
includeRegEx = /\<!--\s*include\s+(\S+)\s*--\>/g
# The Express 3 export.
exports.__express = (path, data, callback) ->
fs.readFile path, 'utf8', (error, template) ->
......@@ -56,8 +58,6 @@ exports.__express = (path, data, callback) ->
#
addPartials = (template) ->
includeRegEx = /\<!--\s*include\s+(\S+)\s*--\>/g
matches = []
viewsPath = path.normalize (path.join __dirname, '..', 'views')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment