aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJohn MacFarlane <[email protected]>2022-06-15 10:52:26 -0600
committerJohn MacFarlane <[email protected]>2022-06-15 10:52:26 -0600
commita6344893b0d2a68bc9ce7e5f907c2f320b01227b (patch)
tree15e986ec94415d81353c106cf623c150ad3454e6 /src
parent786a2d47577c2d36ce0567187d6048b08aeae31b (diff)
Use dev version of citeproc.
Diffstat (limited to 'src')
-rw-r--r--src/Text/Pandoc/Citeproc/BibTeX.hs1
-rw-r--r--src/Text/Pandoc/Citeproc/MetaValue.hs1
-rw-r--r--src/Text/Pandoc/Lua/Marshal/Reference.hs1
3 files changed, 3 insertions, 0 deletions
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