pandoc-slide-filter/app/Clean.hs

19 lines
406 B
Haskell
Raw Permalink Normal View History

#!/usr/bin/env runhaskell
{-# LANGUAGE ScopedTypeVariables #-}
import Text.Pandoc.JSON
main :: IO ()
main = toJSONFilter clean
clean :: Block -> [Block]
clean (Plain []) = []
clean (Para []) = []
clean (LineBlock []) = []
clean (BlockQuote []) = []
clean (OrderedList _ []) = []
clean (BulletList []) = []
clean (DefinitionList []) = []
clean x = [x]