summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
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