aboutsummaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorAlbert Krewinkel <albert@zeitkraut.de>2019-02-09 09:52:51 +0100
committerAlbert Krewinkel <albert@zeitkraut.de>2019-02-09 20:12:33 +0100
commit9a9c138d9cc228537780f83d4de825b3adfe6aa5 (patch)
treedf1c0b8ce52c3d1597ba790fb30c16241cfba637 /data
parent4543543063c210cc3a4215ea05635e5692619c79 (diff)
downloadpandoc-9a9c138d9cc228537780f83d4de825b3adfe6aa5.tar.gz
data/pandoc.lua: re-export all bundled modules
All Lua modules bundled with pandoc, i.e., `pandoc.List`, `pandoc.mediabag`, `pandoc.utils`, and `text` are re-exported from the `pandoc` module. They are assigned to the fields `List`, `mediabag`, `utils`, and `text`, respectively.
Diffstat (limited to 'data')
-rw-r--r--data/init.lua2
-rw-r--r--data/pandoc.lua18
2 files changed, 11 insertions, 9 deletions
diff --git a/data/init.lua b/data/init.lua
index ed39dd294..96813a7d1 100644
--- a/data/init.lua
+++ b/data/init.lua
@@ -3,5 +3,3 @@
-- default modules.
pandoc = require 'pandoc'
-pandoc.mediabag = require 'pandoc.mediabag'
-pandoc.utils = require 'pandoc.utils'
diff --git a/data/pandoc.lua b/data/pandoc.lua
index 2dd8e448e..b69070e81 100644
--- a/data/pandoc.lua
+++ b/data/pandoc.lua
@@ -1,7 +1,7 @@
--[[
pandoc.lua
-Copyright © 2017–2018 Albert Krewinkel
+Copyright © 2017–2019 Albert Krewinkel
Permission to use, copy, modify, and/or distribute this software for any purpose
with or without fee is hereby granted, provided that the above copyright notice
@@ -20,16 +20,20 @@ THIS SOFTWARE.
-- Lua functions for pandoc scripts.
--
-- @author Albert Krewinkel
--- @copyright © 2017–2018 Albert Krewinkel
+-- @copyright © 2017–2019 Albert Krewinkel
-- @license MIT
local M = {}
--- Other modules used here; those are also re-exported.
-local List = require 'pandoc.List'
-local utils = require 'pandoc.utils'
+-- Re-export bundled modules
+M.List = require 'pandoc.List'
+M.mediabag = require 'pandoc.mediabag'
+M.utils = require 'pandoc.utils'
+M.text = require 'text'
+
+-- Local names for modules which this module depends on.
+local List = M.List
+local utils = M.utils
-M.List = List
-M.utils = utils
------------------------------------------------------------------------
-- Accessor objects