diff options
author | Albert Krewinkel <albert@zeitkraut.de> | 2018-02-24 21:59:50 +0100 |
---|---|---|
committer | Albert Krewinkel <albert@zeitkraut.de> | 2018-02-24 22:43:28 +0100 |
commit | b5bd8a9461dc317ff61abec68feba4a86d39e9f2 (patch) | |
tree | a22e940d299d0fb8741d7347ea4be69b3c6c48e9 /test/lua/script-name.lua | |
parent | 39dd7c794bc881acd2030c07ddfb7b34842f19a3 (diff) |
Lua: register script name in global variable
The name of the Lua script which is executed is made available in the
global Lua variable `PANDOC_SCRIPT_FILE`, both for Lua filters and
custom writers.
Closes: #4393
Diffstat (limited to 'test/lua/script-name.lua')
-rw-r--r-- | test/lua/script-name.lua | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/test/lua/script-name.lua b/test/lua/script-name.lua new file mode 100644 index 000000000..4b5a223f0 --- /dev/null +++ b/test/lua/script-name.lua @@ -0,0 +1,3 @@ +function Para (_) + return pandoc.Para{pandoc.Str(PANDOC_SCRIPT_FILE)} +end |