File: blocks-filter.lua

package info (click to toggle)
haskell-pandoc-lua-engine 0.2.1.2-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 648 kB
  • sloc: haskell: 3,709; makefile: 6
file content (8 lines) | stat: -rw-r--r-- 330 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
function Blocks (blks)
  -- verify that this looks like a `pandoc.List`
  if not blks.find or not blks.map or not blks.filter then
    error("table doesn't seem to be an instance of pandoc.List")
  end
  -- return plain block containing the number of elements in the list
  return {pandoc.Plain {pandoc.Str(tostring(#blks))}}
end