mirror of https://github.com/odrling/Aegisub
Added a bit to the template environment so all globals can now be called. (tenv._G refers to the regular global environment, so it's not safe from mangling, but that shouldn't matter either way. It allows much more freedom in writing templates.)
Originally committed to SVN as r1200.
This commit is contained in:
parent
508d3d9a52
commit
59aad1f044
|
@ -248,8 +248,10 @@ function apply_templates(meta, styles, subs, templates)
|
||||||
local tenv = {
|
local tenv = {
|
||||||
-- put in some standard libs
|
-- put in some standard libs
|
||||||
string = string,
|
string = string,
|
||||||
math = math
|
math = math,
|
||||||
|
_G = _G
|
||||||
}
|
}
|
||||||
|
tenv.tenv = tenv
|
||||||
|
|
||||||
-- run all run-once code snippets
|
-- run all run-once code snippets
|
||||||
for k, t in pairs(templates.once) do
|
for k, t in pairs(templates.once) do
|
||||||
|
|
Loading…
Reference in New Issue