diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2013-07-01 21:00:04 -0700 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2013-07-01 21:00:46 -0700 |
commit | 9009a7e4a8e8b9ddbf3327ae8a37f4bcb5df1b92 (patch) | |
tree | ca5b6898e7ef2f11d39666357acd8d674f8c78aa /src/Text/Pandoc | |
parent | e7a68fc7e82028dbf66f25350b45875fbe634db6 (diff) | |
download | pandoc-9009a7e4a8e8b9ddbf3327ae8a37f4bcb5df1b92.tar.gz |
Markdown writer: Commas are okay in plain yaml scalars.
It's just commas with brackets that can cause problems.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index aa29ebce1..2995f63cf 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -135,7 +135,7 @@ jsonToYaml (String "") = empty jsonToYaml (String s) = case T.unpack s of x | '\n' `elem` x -> hang 2 ("|" <> cr) $ text x - | not (any (`elem` x) "\"'#:[]{},?-") -> text x + | not (any (`elem` x) "\"'#:[]{}?-") -> text x | otherwise -> text $ "'" ++ substitute "'" "''" x ++ "'" jsonToYaml (Bool b) = text $ show b jsonToYaml (Number n) = text $ show n |