From a6344893b0d2a68bc9ce7e5f907c2f320b01227b Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Wed, 15 Jun 2022 10:52:26 -0600 Subject: Use dev version of citeproc. --- src/Text/Pandoc/Citeproc/BibTeX.hs | 1 + src/Text/Pandoc/Citeproc/MetaValue.hs | 1 + src/Text/Pandoc/Lua/Marshal/Reference.hs | 1 + 3 files changed, 3 insertions(+) (limited to 'src') diff --git a/src/Text/Pandoc/Citeproc/BibTeX.hs b/src/Text/Pandoc/Citeproc/BibTeX.hs index 9d6b0b47e..5db99d66b 100644 --- a/src/Text/Pandoc/Citeproc/BibTeX.hs +++ b/src/Text/Pandoc/Citeproc/BibTeX.hs @@ -192,6 +192,7 @@ writeBibtexString opts variant mblang ref = Just t -> t Nothing -> T.intercalate "/" (map renderDatePart (dateParts date)) <> (if dateCirca date then "~" else mempty) + valToInlines SubstitutedVal = mempty renderDatePart (DateParts xs) = T.intercalate "-" $ map (T.pack . printf "%02d") xs diff --git a/src/Text/Pandoc/Citeproc/MetaValue.hs b/src/Text/Pandoc/Citeproc/MetaValue.hs index b43ca7314..b4de79426 100644 --- a/src/Text/Pandoc/Citeproc/MetaValue.hs +++ b/src/Text/Pandoc/Citeproc/MetaValue.hs @@ -56,6 +56,7 @@ valToMetaValue (FancyVal ils) = MetaInlines (B.toList ils) valToMetaValue (NumVal n) = MetaString (T.pack $ show n) valToMetaValue (NamesVal ns) = MetaList $ map nameToMetaValue ns valToMetaValue (DateVal d) = dateToMetaValue d +valToMetaValue _ = MetaString mempty nameToMetaValue :: Name -> MetaValue nameToMetaValue name = diff --git a/src/Text/Pandoc/Lua/Marshal/Reference.hs b/src/Text/Pandoc/Lua/Marshal/Reference.hs index 3bbc4082c..c23bfef9f 100644 --- a/src/Text/Pandoc/Lua/Marshal/Reference.hs +++ b/src/Text/Pandoc/Lua/Marshal/Reference.hs @@ -81,6 +81,7 @@ pushVal = \case NumVal i -> pushIntegral i NamesVal names -> pushPandocList pushName names DateVal date -> pushDate date + _ -> pushText mempty -- | Pushes a 'Date' as table. pushDate :: LuaError e => Pusher e Date -- cgit v1.2.3