aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2019-05-04 08:44:59 -0700
committerJohn MacFarlane <jgm@berkeley.edu>2019-05-04 08:44:59 -0700
commitd73cb5f1a86679e42f226125d7f4dbf2564f79af (patch)
treebef761ff5d295a8585eb3e5e516e14853c692086
parentc4a81fb941adf6c3bf524916c46623685d276f32 (diff)
downloadpandoc-d73cb5f1a86679e42f226125d7f4dbf2564f79af.tar.gz
Improve c4a81fb941adf6c3bf524916c46623685d276f32.
We do want to recognize "0" as a number, even though it has "0" as a prefix.
-rw-r--r--src/Text/Pandoc/Writers/Shared.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Shared.hs b/src/Text/Pandoc/Writers/Shared.hs
index e99758cba..1f55be797 100644
--- a/src/Text/Pandoc/Writers/Shared.hs
+++ b/src/Text/Pandoc/Writers/Shared.hs
@@ -109,7 +109,7 @@ metaValueToJSON blockWriter inlineWriter (MetaMap metamap) = toJSON <$>
metaValueToJSON blockWriter inlineWriter (MetaList xs) = toJSON <$>
Traversable.mapM (metaValueToJSON blockWriter inlineWriter) xs
metaValueToJSON _ _ (MetaBool b) = return $ toJSON b
-metaValueToJSON _ inlineWriter (MetaString s@('0':_)) =
+metaValueToJSON _ inlineWriter (MetaString s@('0':_:_)) =
-- don't treat string with leading 0 as string (#5479)
toJSON <$> inlineWriter (Builder.toList (Builder.text s))
metaValueToJSON _ inlineWriter (MetaString s) =