Skip to content

Commit a807461

Browse files
committed
use local functions instead of global
1 parent 088a037 commit a807461

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

inst/resources/lua/custom-environment.lua

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ local proof_label = {
2323

2424
-- for debuging purpose
2525
local debug_mode = os.getenv("DEBUG_PANDOC_LUA") == "TRUE"
26-
function print_debug(label,obj,iter)
26+
local function print_debug(label,obj,iter)
2727
obj = obj or nil
2828
iter = iter or pairs
2929
label = label or ""
@@ -44,7 +44,7 @@ end
4444

4545
-- create a unique id for a div with none provided
4646
local counter = 0
47-
function unlabeled_div()
47+
local function unlabeled_div()
4848
counter = counter + 1
4949
return "unlabeled-div-"..(counter)
5050
end
@@ -111,7 +111,7 @@ Div = function (div)
111111
end
112112

113113
-- return [name] for latex, and (name) for html
114-
function get_name(format, options)
114+
local function get_name(format, options)
115115
local name = options["name"]
116116
if (name == nil) then return "" end
117117
local template

0 commit comments

Comments
 (0)