#!/usr/bin/env runhaskell {-# LANGUAGE OverloadedStrings #-} -- list-tables.hs import Text.Pandoc.JSON main :: IO () main = toJSONFilter listTables listTables :: Block -> Block listTables (Table attr caption colSpec tableHead tableBody tableFoot) = let addClass (identifier, classes, pairs) = (identifier, "list-table":classes, pairs) in Table (addClass attr) caption colSpec tableHead tableBody tableFoot listTables x = x