diff options
author | Giovanni Giacobbi <giovanni@giacobbi.net> | 2021-01-16 15:30:03 +0100 |
---|---|---|
committer | Hannu Nyman <hannu.nyman@iki.fi> | 2021-01-20 17:48:16 +0200 |
commit | af422b192462813150863752f9c300af55df4996 (patch) | |
tree | ef07c2f73da55ba53792d792e287674f01ddd535 /modules/luci-base/luasrc/template.lua | |
parent | d3280e6f5df17b799230e229c9472cf8854015ae (diff) |
treewide: removed trailing whitespaces and extra newlines in 'modules'
Signed-off-by: Giovanni Giacobbi <giovanni@giacobbi.net>
Diffstat (limited to 'modules/luci-base/luasrc/template.lua')
-rw-r--r-- | modules/luci-base/luasrc/template.lua | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/luci-base/luasrc/template.lua b/modules/luci-base/luasrc/template.lua index cd9b73b22b..3955bd76f3 100644 --- a/modules/luci-base/luasrc/template.lua +++ b/modules/luci-base/luasrc/template.lua @@ -53,7 +53,7 @@ function Template.__init__(self, name, template) -- Create a new namespace for this template self.viewns = context.viewns - + -- If we have a cached template, skip compiling and loading if not self.template then @@ -84,13 +84,13 @@ end -- Renders a template function Template.render(self, scope) scope = scope or getfenv(2) - + -- Put our predefined objects in the scope of the template setfenv(self.template, setmetatable({}, {__index = function(tbl, key) return rawget(tbl, key) or self.viewns[key] or scope[key] end})) - + -- Now finally render the thing local stat, err = util.copcall(self.template) if not stat then |