2019-11-22 18:33:32 +01:00
|
|
|
#!/usr/bin/env stack
|
|
|
|
-- stack --stack-yaml=stack.yaml runghc --package pandoc-types
|
|
|
|
|
2015-11-15 17:17:09 +01:00
|
|
|
-- 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
|