aboutsummaryrefslogtreecommitdiff
path: root/extract-changes.hs
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2015-11-15 08:17:09 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2015-11-15 08:17:09 -0800
commit07e1234c3bbedea38793891215006c0e03d6582c (patch)
treed8eb78edf5b61a9790aa4e454903942f69b963b4 /extract-changes.hs
parent9ebd601d89221753846259b9deea9266d0dce548 (diff)
downloadpandoc-07e1234c3bbedea38793891215006c0e03d6582c.tar.gz
Added 'make changes' target.
This copies to osx clipboard a github-markdown version of the changes from the latest release in the changelog.
Diffstat (limited to 'extract-changes.hs')
-rw-r--r--extract-changes.hs9
1 files changed, 9 insertions, 0 deletions
diff --git a/extract-changes.hs b/extract-changes.hs
new file mode 100644
index 000000000..8c8160c2c
--- /dev/null
+++ b/extract-changes.hs
@@ -0,0 +1,9 @@
+-- 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