From d73cb5f1a86679e42f226125d7f4dbf2564f79af Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Sat, 4 May 2019 08:44:59 -0700 Subject: Improve c4a81fb941adf6c3bf524916c46623685d276f32. We do want to recognize "0" as a number, even though it has "0" as a prefix. --- src/Text/Pandoc/Writers/Shared.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) = -- cgit v1.2.3