pandoc-citeproc 0.11 → 0.11.1
raw patch · 4 files changed
+15/−4 lines, 4 filesdep ~basePVP ok
version bump matches the API change (PVP)
Dependency ranges changed: base
API changes (from Hackage documentation)
+ Text.CSL.Exception: instance Data.Data.Data Text.CSL.Exception.CiteprocException
Files
- changelog +6/−0
- pandoc-citeproc.cabal +1/−1
- src/Text/CSL/Exception.hs +3/−1
- src/Text/CSL/Pandoc.hs +5/−2
changelog view
@@ -1,3 +1,9 @@+pandoc-citeproc (0.11.1)++ * Don't produce ??? with empty suppress-author citation (#156).+ * Added Typeable, Data instances for CiteprocException. This+ is needed for some older ghc versions.+ pandoc-citeproc (0.11) * Add Text.CSL.Exception module exporting CiteprocException [API change].
pandoc-citeproc.cabal view
@@ -1,5 +1,5 @@ name: pandoc-citeproc-version: 0.11+version: 0.11.1 cabal-version: >= 1.12 synopsis: Supports using pandoc with citeproc
src/Text/CSL/Exception.hs view
@@ -1,6 +1,8 @@ {-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE DeriveDataTypeable #-} module Text.CSL.Exception (CiteprocException(..)) where import Control.Exception (Exception)+import Data.Data data CiteprocException = ErrorParsingReferences String@@ -11,7 +13,7 @@ | ErrorSplittingDate | MacroNotFound String | DependentStyleHasItselfAsParent String- deriving Show+ deriving (Show, Data, Typeable) instance Exception CiteprocException
src/Text/CSL/Pandoc.hs view
@@ -239,8 +239,11 @@ processCite :: Style -> M.Map [Citation] Formatted -> Inline -> Inline processCite s cs (Cite t _) = case M.lookup t cs of- Just (Formatted (x:xs)) -> Cite t (renderPandoc s (Formatted (x:xs)))- _ -> Strong [Str "???"] -- TODO raise error instead?+ Just (Formatted xs)+ | not (null xs) || all isSuppressAuthor t+ -> Cite t (renderPandoc s (Formatted xs))+ _ -> Strong [Str "???"] -- TODO raise error instead?+ where isSuppressAuthor c = citationMode c == SuppressAuthor processCite _ _ x = x isNote :: Inline -> Bool