pandoc/tools/extract-changes.hs

13 lines
337 B
Haskell
Raw Normal View History

#!/usr/bin/env stack
-- stack --stack-yaml=stack.yaml runghc --package pandoc-types
-- Extract changes from latest version in changelog.
import Text.Pandoc.JSON
main = toJSONFilter extractFirst
extractFirst :: Pandoc -> Pandoc
extractFirst (Pandoc meta (Para{} : BulletList bs : _)) =
Pandoc meta [BulletList bs]
extractFirst x = x