git.iko.soy/typeable/pandoc
on master help sign in
MANUAL.txt: update description of `-L`/`--lua-filter`.

The example filter was outdated, a reference to the separate Lua filters documentation is added instead.

commit45174d7385c4ac09d56dcdd55d1be4bf601a1fa4 authorAlbert Krewinkel <albert@zeitkraut.de> dateMon 11 Jan 2021, 16:12 (6 years ago) parent68fa437
1 file changed+10−18
MANUAL.txt+10−18
MANUAL.txt+10−18
@@ -588,8 +588,8 @@ header when requesting a document from a URL:
588588
589589 3. `$PATH` (executable only)
590590
591− Filters and Lua-filters are applied in the order specified
592− on the command line.
591+ Filters, Lua-filters, and citeproc processing are applied in
592+ the order specified on the command line.
593593
594594`-L` *SCRIPT*, `--lua-filter=`*SCRIPT*
595595
@@ -603,26 +603,17 @@ header when requesting a document from a URL:
603603 The `pandoc` Lua module provides helper functions for element
604604 creation. It is always loaded into the script's Lua environment.
605605
606− The following is an example Lua script for macro-expansion:
607−
608− function expand_hello_world(inline)
609− if inline.c == '{{helloworld}}' then
610− return pandoc.Emph{ pandoc.Str "Hello, World" }
611− else
612− return inline
613− end
614− end
615−
616− return {{Str = expand_hello_world}}
606+ See the [Lua filters documentation] for further details.
617607
618608 In order of preference, pandoc will look for Lua filters in
619609
620− 1. a specified full or relative path (executable or
621− non-executable)
610+ 1. a specified full or relative path
622611
623− 2. `$DATADIR/filters` (executable or non-executable)
624− where `$DATADIR` is the user data directory (see
625− `--data-dir`, above).
612+ 2. `$DATADIR/filters` where `$DATADIR` is the user data
613+ directory (see `--data-dir`, above).
614+
615+ Filters, Lua filters, and citeproc processing are applied in
616+ the order specified on the command line.
626617
627618`-M` *KEY*[`=`*VAL*], `--metadata=`*KEY*[`:`*VAL*]
628619
@@ -707,6 +698,7 @@ header when requesting a document from a URL:
707698[PHP]: https://github.com/vinai/pandocfilters-php
708699[perl]: https://metacpan.org/pod/Pandoc::Filter
709700[JavaScript/node.js]: https://github.com/mvhenderson/pandoc-filter-node
701+[Lua filters documentation]: https://pandoc.org/lua-filters.html
710702
711703## General writer options {.options}
712704