aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorSean Whitton <spwhitton@spwhitton.name>2019-11-28 21:34:54 +0000
committerSean Whitton <spwhitton@spwhitton.name>2019-11-28 21:34:54 +0000
commitfe4de681c5481f92c8f50f1eca8c636690323458 (patch)
tree79b5d15619b74b25ecece745eea55598f6ed01c2
parent80f6d7a62539817c08f41ea46159c05ce9bc2915 (diff)
downloadpandoc-citeproc-preamble-fe4de681c5481f92c8f50f1eca8c636690323458.tar.gz
Select pandoc-citeproc's refs Div by its 'refs' identifier
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
-rw-r--r--debian/changelog7
-rw-r--r--src/pandoc-citeproc-preamble.hs4
2 files changed, 9 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 4f3155a..9673959 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,5 +1,12 @@
pandoc-citeproc-preamble (1.2.5-1) UNRELEASED; urgency=medium
+ * Select pandoc-citeproc's refs Div by its 'refs' identifier, rather
+ than by its 'references' class (see definition of Attr type in
+ Text.Pandoc.Definition).
+ This fixes pandoc-citeproc-preamble with pandoc-citeproc >=0.16.3.
+ From that release, pandoc-citeproc can add a 'hanging-indent' class to
+ the refs Div, which broke pandoc-citeproc-preamble's selecting the
+ refs Div.
* Add a simple integration test.
* README.md: Don't specify a --resolver argument in the sample `stack
install` command.
diff --git a/src/pandoc-citeproc-preamble.hs b/src/pandoc-citeproc-preamble.hs
index 3453e49..b446579 100644
--- a/src/pandoc-citeproc-preamble.hs
+++ b/src/pandoc-citeproc-preamble.hs
@@ -2,7 +2,7 @@
pandoc-citeproc-preamble --- Insert a preamble before pandoc-citeproc's bibliography
- Copyright (C) 2015-2016 Sean Whitton
+ Copyright (C) 2015-2016, 2019 Sean Whitton
This file is part of pandoc-citeproc-preamble.
@@ -31,7 +31,7 @@ import Text.Pandoc.JSON
insertPreamble :: Block -> [Block] -> [Block]
insertPreamble preamble = foldr step []
where
- step refsDiv@(Div (_, ["references"], _) theRefs) xs =
+ step refsDiv@(Div ("refs", _, _) theRefs) xs =
-- check whether pandoc-citeproc actually inserted any
-- references
if null theRefs