aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlbert Krewinkel <[email protected]>2024-10-01 12:13:16 +0200
committerAlbert Krewinkel <[email protected]>2024-10-01 12:24:13 +0200
commita37035caa1f94f564a17afe874d448dab0793b76 (patch)
tree1bd4f8cefaf30f49b2b58a8c53a1db396c6d301a
parent4cf6ddb027cdc262e34dea50ec77f3fcdbc517d2 (diff)
doc/lua-filters.md: list functions in `pandoc.utils` alphabetically
-rw-r--r--doc/lua-filters.md72
-rw-r--r--pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs6
2 files changed, 39 insertions, 39 deletions
diff --git a/doc/lua-filters.md b/doc/lua-filters.md
index 0ac8a22f0..05e8d743c 100644
--- a/doc/lua-filters.md
+++ b/doc/lua-filters.md
@@ -4066,6 +4066,27 @@ Returns:
*Since: 2.8*
+### normalize_date {#pandoc.utils.normalize_date}
+
+`normalize_date (date)`
+
+Parse a date and convert (if possible) to "YYYY-MM-DD" format. We
+limit years to the range 1601-9999 (ISO 8601 accepts greater than
+or equal to 1583, but MS Word only accepts dates starting 1601).
+Returns nil instead of a string if the conversion failed.
+
+Parameters:
+
+`date`
+: the date string (string)
+
+Returns:
+
+- normalized date, or nil if normalization failed. ([string or
+ nil]{unknown-type="string or nil"})
+
+*Since: 2.0.6*
+
### references {#pandoc.utils.references}
`references (doc)`
@@ -4100,31 +4121,6 @@ Returns:
*Since: 2.17*
-### run_lua_filter {#pandoc.utils.run_lua_filter}
-
-`run_lua_filter (doc, filter[, env])`
-
-Filter the given doc by passing it through a Lua filter.
-
-The filter will be run in the current Lua process.
-
-Parameters:
-
-`doc`
-: the Pandoc document to filter ([Pandoc])
-
-`filter`
-: filepath of the filter to run (string)
-
-`env`
-: environment to load and run the filter in (table)
-
-Returns:
-
-- filtered document ([Pandoc])
-
-*Since: 3.2.1*
-
### run_json_filter {#pandoc.utils.run_json_filter}
`run_json_filter (doc, filter[, args])`
@@ -4149,26 +4145,30 @@ Returns:
*Since: 2.1.1*
-### normalize_date {#pandoc.utils.normalize_date}
+### run_lua_filter {#pandoc.utils.run_lua_filter}
-`normalize_date (date)`
+`run_lua_filter (doc, filter[, env])`
-Parse a date and convert (if possible) to "YYYY-MM-DD" format. We
-limit years to the range 1601-9999 (ISO 8601 accepts greater than
-or equal to 1583, but MS Word only accepts dates starting 1601).
-Returns nil instead of a string if the conversion failed.
+Filter the given doc by passing it through a Lua filter.
+
+The filter will be run in the current Lua process.
Parameters:
-`date`
-: the date string (string)
+`doc`
+: the Pandoc document to filter ([Pandoc])
+
+`filter`
+: filepath of the filter to run (string)
+
+`env`
+: environment to load and run the filter in (table)
Returns:
-- normalized date, or nil if normalization failed. ([string or
- nil]{unknown-type="string or nil"})
+- filtered document ([Pandoc])
-*Since: 2.0.6*
+*Since: 3.2.1*
### sha1 {#pandoc.utils.sha1}
diff --git a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs
index 325f09258..fb0f3ee74 100644
--- a/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs
+++ b/pandoc-lua-engine/src/Text/Pandoc/Lua/Module/Utils.hs
@@ -53,16 +53,16 @@ documentedModule = Module
, moduleFields = []
, moduleOperations = []
, moduleTypeInitializers = []
- , moduleFunctions = -- FIXME: order alphabetically
+ , moduleFunctions =
[ blocks_to_inlines `since` v[2,2,3]
, citeproc `since` v[2,19,1]
, equals `since` v[2,5]
, from_simple_table `since` v[2,11]
, make_sections `since` v[2,8]
+ , normalize_date `since` v[2,0,6]
, references `since` v[2,17]
- , run_lua_filter `since` v[3,2,1]
, run_json_filter `since` v[2,1,1]
- , normalize_date `since` v[2,0,6]
+ , run_lua_filter `since` v[3,2,1]
, sha1 `since` v[2,0,6]
, stringify `since` v[2,0,6]
, to_roman_numeral `since` v[2,0,6]