git.iko.soy/typeable/pandoc
on master help sign in
Markdown writer: Commas are okay in plain yaml scalars.

It's just commas with brackets that can cause problems.

commit9009a7e4a8e8b9ddbf3327ae8a37f4bcb5df1b92 authorJohn MacFarlane <fiddlosopher@gmail.com> dateMon 1 Jul 2013, 21:00 (13 years ago) parente7a68fc
2 files changed+2−2
src/Text/Pandoc/Writers/Markdown.hs+1−1 tests/writer.markdown+1−1
src/Text/Pandoc/Writers/Markdown.hs+1−1
@@ -135,7 +135,7 @@ jsonToYaml (String "") = empty
135135jsonToYaml (String s) =
136136 case T.unpack s of
137137 x | '\n' `elem` x -> hang 2 ("|" <> cr) $ text x
138− | not (any (`elem` x) "\"'#:[]{},?-") -> text x
138+ | not (any (`elem` x) "\"'#:[]{}?-") -> text x
139139 | otherwise -> text $ "'" ++ substitute "'" "''" x ++ "'"
140140jsonToYaml (Bool b) = text $ show b
141141jsonToYaml (Number n) = text $ show n
tests/writer.markdown+1−1
@@ -2,7 +2,7 @@
22author:
33- John MacFarlane
44- Anonymous
5−date: 'July 17, 2006'
5+date: July 17, 2006
66title: Pandoc Test Suite
77...
88