diff options
author | John MacFarlane <jgm@berkeley.edu> | 2019-05-04 08:44:59 -0700 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2019-05-04 08:44:59 -0700 |
commit | d73cb5f1a86679e42f226125d7f4dbf2564f79af (patch) | |
tree | bef761ff5d295a8585eb3e5e516e14853c692086 /src | |
parent | c4a81fb941adf6c3bf524916c46623685d276f32 (diff) | |
download | pandoc-d73cb5f1a86679e42f226125d7f4dbf2564f79af.tar.gz |
Improve c4a81fb941adf6c3bf524916c46623685d276f32.
We do want to recognize "0" as a number, even though
it has "0" as a prefix.
Diffstat (limited to 'src')
-rw-r--r-- | src/Text/Pandoc/Writers/Shared.hs | 2 |
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) = |