Lua: support topdown traversals

The traversal order of filters can now be selected by setting the key
`traverse` of the filter to either `'topdown'` or `'typewise'`; the
default remains `'typewise'`.

Topdown traversals can be cut short by returning `false` as a second
value from the filter function. No child-element of the returned element
is processed in that case.
This commit is contained in:
Albert Krewinkel
2021-12-13 08:52:19 -08:00
committed by John MacFarlane
parent 0679620f92
commit b79bf192ec
4 changed files with 55 additions and 4 deletions
+2 -1
View File
@@ -26,7 +26,6 @@ extra-deps:
- lua-2.0.2
- tasty-hslua-1.0.0
- tasty-lua-1.0.0
- pandoc-lua-marshal-0.1.2
- pandoc-types-1.22.1
- commonmark-0.2.1.1
- commonmark-extensions-0.2.2
@@ -37,6 +36,8 @@ extra-deps:
- unicode-data-0.2.0
- git: https://github.com/jgm/ipynb.git
commit: 00246af10885c2ad4413ace4f69a7e6c88297a08
- git: https://github.com/pandoc/pandoc-lua-marshal
commit: 98e3de5087bb533fadbb89720f83f7f7cc3be5bf
ghc-options:
"$locals": -fhide-source-paths -Wno-missing-home-modules
resolver: lts-18.10