From fe4de681c5481f92c8f50f1eca8c636690323458 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Thu, 28 Nov 2019 21:34:54 +0000 Subject: Select pandoc-citeproc's refs Div by its 'refs' identifier Signed-off-by: Sean Whitton --- debian/changelog | 7 +++++++ src/pandoc-citeproc-preamble.hs | 4 ++-- 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 -- cgit v1.2.3