diff options
Diffstat (limited to 'data')
-rw-r--r-- | data/pandoc.lua | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/data/pandoc.lua b/data/pandoc.lua index 551a59d27..e56df3b6d 100644 --- a/data/pandoc.lua +++ b/data/pandoc.lua @@ -23,7 +23,7 @@ THIS SOFTWARE. -- @copyright © 2017 Albert Krewinkel -- @license MIT local M = { - _VERSION = "0.3.0" + _VERSION = "0.4.0" } local List = require 'pandoc.List' @@ -868,41 +868,6 @@ M.LowerAlpha = "LowerAlpha" -- @see OrderedList M.UpperAlpha = "UpperAlpha" - ------------------------------------------------------------------------- --- Helper Functions --- @section helpers - ---- Use functions defined in the global namespace to create a pandoc filter. --- All globally defined functions which have names of pandoc elements are --- collected into a new table. --- @return A list of filter functions --- @usage --- -- within a file defining a pandoc filter: --- text = require 'text' --- function Str(elem) --- return pandoc.Str(text.upper(elem.text)) --- end --- --- return {pandoc.global_filter()} --- -- the above is equivalent to --- -- return {{Str = Str}} -function M.global_filter() - local res = {} - function is_filter_function(k) - return M.Inline.constructor[k] or - M.Block.constructor[k] or - k == "Meta" or k == "Doc" or k == "Pandoc" or - k == "Block" or k == "Inline" - end - for k, v in pairs(_G) do - if is_filter_function(k) then - res[k] = v - end - end - return res -end - ------------------------------------------------------------------------ -- Functions which have moved to different modules local utils = require 'pandoc.utils' |