summaryrefslogtreecommitdiff
path: root/xmake/core/base/template.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-02-13 20:08:54 +0800
committerruki <[email protected]>2016-02-15 19:10:27 +0800
commit271a251ea5ead16ac3cf20a522a8fc910b3dcc85 (patch)
tree37bf84eb84f3a552d3915e0deed4d8684b0a4e3d /xmake/core/base/template.lua
parentbee6cc1eb08ce7f48b4f58b04effbdd707fc44b3 (diff)
fix template filter
Diffstat (limited to 'xmake/core/base/template.lua')
-rw-r--r--xmake/core/base/template.lua5
1 files changed, 3 insertions, 2 deletions
diff --git a/xmake/core/base/template.lua b/xmake/core/base/template.lua
index ab2f400dc..19e347e20 100644
--- a/xmake/core/base/template.lua
+++ b/xmake/core/base/template.lua
@@ -30,6 +30,7 @@ local path = require("base/path")
local table = require("base/table")
local utils = require("base/utils")
local string = require("base/string")
+local filter = require("base/filter")
local interpreter = require("base/interpreter")
-- get interpreter
@@ -205,7 +206,7 @@ function template.create(language, templateid, targetname)
assert(interp)
-- set filter
- interp:filter_set(function (variable)
+ interp:filter_set(filter.init(function (variable)
-- replace targetname
if variable == "targetname" then
@@ -218,7 +219,7 @@ function template.create(language, templateid, targetname)
-- ok?
return variable
- end)
+ end))
-- load all templates for the given language
local templates = template.loadall(language)