pandoc/doc
Albert Krewinkel 672a4bdd1d Lua filters: allow filtering of element lists ()
Lists of Inline and Block elements can now be filtered via `Inlines` and
`Blocks` functions, respectively. This is helpful if a filter conversion
depends on the order of elements rather than a single element.

For example, the following filter can be used to remove all spaces
before a citation:

    function isSpaceBeforeCite (spc, cite)
      return spc and spc.t == 'Space'
       and cite and cite.t == 'Cite'
    end

    function Inlines (inlines)
      for i = #inlines-1,1,-1 do
        if isSpaceBeforeCite(inlines[i], inlines[i+1]) then
          inlines:remove(i)
        end
      end
      return inlines
    end

Closes: 
2020-01-15 14:26:00 -08:00
..
customizing-pandoc.md Fix capitalization of "Linux" in docs () 2019-10-28 10:45:36 -07:00
epub.md Fix broken links in documents () 2019-05-01 20:09:36 -04:00
filters.md Update filters doc with better cabal v2 instructions. 2020-01-14 16:31:09 -08:00
getting-started.md Fix capitalization of "Linux" in docs () 2019-10-28 10:45:36 -07:00
lua-filters.md Lua filters: allow filtering of element lists () 2020-01-15 14:26:00 -08:00
org.md Fix typos () 2019-11-20 09:44:23 -08:00
using-the-pandoc-api.md Fix broken links in documents () 2019-05-01 20:09:36 -04:00