git.iko.soy/typeable/pandoc
on master help sign in
data/pandoc.lua: re-export List and utils module
commit713ed7c0c5a6f64348f30d02d7baee0e46ef371c authorAlbert Krewinkel <albert@zeitkraut.de> dateThu 7 Feb 2019, 09:50 (8 years ago) parent1847bdb
2 files changed+25−1
data/pandoc.lua+4 doc/lua-filters.md+21−1
data/pandoc.lua+4
@@ -24,9 +24,13 @@ THIS SOFTWARE.
2424-- @license MIT
2525local M = {}
2626
27+-- Other modules used here; those are also re-exported.
2728local List = require 'pandoc.List'
2829local utils = require 'pandoc.utils'
2930
31+M.List = List
32+M.utils = utils
33+
3034------------------------------------------------------------------------
3135-- Accessor objects
3236--
doc/lua-filters.md+21−1
@@ -2192,11 +2192,20 @@ Usage:
21922192 -- The inline element in that block is an `Emph`
21932193 assert(block.content[1].t == "Emph")
21942194
2195+
21952196# Module pandoc.utils
21962197
21972198This module exposes internal pandoc functions and utility
21982199functions.
21992200
2201+The module is loaded as part of the `pandoc` module and available
2202+as `pandoc.utils`. In versions up-to and including pandoc 2.6,
2203+this module had to be loaded explicitly. Example:
2204+
2205+ local utils = require 'pandoc.utils'
2206+
2207+Use this for backwards compatibility.
2208+
22002209### blocks\_to\_inlines {#utils-blocks_to_inlines}
22012210
22022211`blocks_to_inlines (blocks[, sep])`
@@ -2468,9 +2477,20 @@ Usage:
24682477 local diagram_url = "https://pandoc.org/diagram.jpg"
24692478 local contents = pandoc.mediabag.fetch(diagram_url, ".")
24702479
2480+
24712481# Module pandoc.List
24722482
2473−Pandoc\'s List type and helper methods
2483+Pandoc's List type and helper methods.
2484+
2485+This module is loaded and available as `pandoc.List`. Older
2486+versions up-to and including pandoc 2.6 require the module to be
2487+loaded explicitly. Example:
2488+
2489+ local List = require 'pandoc.List'
2490+
2491+The above remains the recommended method to use this module; it
2492+provides the List type under an idiomatic name and is fully
2493+backwards compatible.
24742494
24752495## Metamethods
24762496