From 75c791b4fea141417fa088b9f5b9861ef57f4790 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Sat, 9 Feb 2019 22:56:49 +0100 Subject: Lua filters: load module `pandoc` before calling `init.lua` (#5287) The file `init.lua` in pandoc's data directory is run as part of pandoc's Lua initialization process. Previously, the `pandoc` module was loaded in `init.lua`, and the structure for marshaling was set-up after. This allowed simple patching of element marshaling, but made using `init.lua` more difficult: - it encouraged mixing essential initialization with user-defined customization; - upstream changes to init.lua had to be merged manually; - accidentally breaking marshaling by removing required modules was possible; Instead, all required modules are now loaded before calling `init.lua`. The file can be used entirely for user customization. Patching marshaling functions, while discouraged, is still possible via the `debug` module. --- data/init.lua | 2 -- 1 file changed, 2 deletions(-) (limited to 'data/init.lua') diff --git a/data/init.lua b/data/init.lua index 96813a7d1..84d826e73 100644 --- a/data/init.lua +++ b/data/init.lua @@ -1,5 +1,3 @@ -- This Lua script is run every time the Lua interpreter is started when running -- a Lua filter. It can be customized to load additional modules or to alter the -- default modules. - -pandoc = require 'pandoc' -- cgit v1.2.3