diff options
author | Albert Krewinkel <albert+github@zeitkraut.de> | 2018-10-26 07:12:14 +0200 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2018-10-25 22:12:14 -0700 |
commit | 096cbe698746d621bfee9607b1ab826240082a10 (patch) | |
tree | 15421f7681998d0de0de828341ac9cb17fcaef99 /test/command/lua-pandoc-state.md | |
parent | 8f9ab3db256f6acace90864a9ed569675ede9def (diff) | |
download | pandoc-096cbe698746d621bfee9607b1ab826240082a10.tar.gz |
Lua: allow access to pandoc state (#5015)
* Lua: allow access to pandoc state
Lua filters and custom writers now have read-only access to most fields
of pandoc's internal state via the global variable `PANDOC_STATE`.
* Lua: allow iterating through fields of PANDOC_STATE
* Lua filters doc: describe CommonState
* Lua filters doc: mention global variable PANDOC_STATE
* Lua: add access to logs
Log messages can currently only be printed, but not decomposed.
Diffstat (limited to 'test/command/lua-pandoc-state.md')
-rw-r--r-- | test/command/lua-pandoc-state.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/command/lua-pandoc-state.md b/test/command/lua-pandoc-state.md new file mode 100644 index 000000000..33045f64a --- /dev/null +++ b/test/command/lua-pandoc-state.md @@ -0,0 +1,14 @@ +``` +% pandoc --lua-filter=command/lua-pandoc-state.lua +Hello +^D + # input files: 0 + output file: nil +# request header: 0 + resource path: . + source URL: nil + user data dir: defined + trace: false + verbosity: WARNING +<p>Hello</p> +``` |