From ebf7f782d3151956d6e886c9615580c0b67f6656 Mon Sep 17 00:00:00 2001 From: Albert Krewinkel Date: Thu, 11 Nov 2021 09:13:27 +0100 Subject: Lua: load `re` module available into global of the same name --- doc/lua-filters.md | 27 ++++++++++++++++++++------- 1 file changed, 20 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/lua-filters.md b/doc/lua-filters.md index ba5f58120..38790ca5d 100644 --- a/doc/lua-filters.md +++ b/doc/lua-filters.md @@ -245,15 +245,28 @@ variables. variable is of type [CommonState] and is read-only. -## Global modules - -There are two modules which are preloaded and accessible through -global variables. The first is `pandoc`, which is described in the -next section. The other is `lpeg`, a package based on Parsing -Expression Grammars (PEG). See the official [LPeg homepage] for -details. +`pandoc` +: The *pandoc* module, described in the next section, is + available through the global `pandoc`. The other modules + described herein are loaded as subfields under their + respective name. + +`lpeg` +: This variable holds the `lpeg` module, a package based on + Parsing Expression Grammars (PEG). It provides excellent + parsing utilities and is documented on the official [LPeg + homepage]. Pandoc will try to load the module through the + normal package mechanism, and fall back to a built-in version + if necessary. + +`re` +: Contains the LPeg.re module, which is built on top of LPeg and + offers an implementation of a [regex engine]. Pandoc will try + to load the module through the normal package mechanism, and + fall back to a built-in version if necessary. [LPeg homepage]: http://www.inf.puc-rio.br/~roberto/lpeg/ +[regex engine]: http://www.inf.puc-rio.br/~roberto/lpeg/re.html # Pandoc Module -- cgit v1.2.3