From 9009a7e4a8e8b9ddbf3327ae8a37f4bcb5df1b92 Mon Sep 17 00:00:00 2001
From: John MacFarlane <fiddlosopher@gmail.com>
Date: Mon, 1 Jul 2013 21:00:04 -0700
Subject: [PATCH] Markdown writer:  Commas are okay in plain yaml scalars.

It's just commas with brackets that can cause problems.
---
 src/Text/Pandoc/Writers/Markdown.hs | 2 +-
 tests/writer.markdown               | 2 +-
 2 files changed, 2 insertions(+), 2 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
diff --git a/tests/writer.markdown b/tests/writer.markdown
index 9db6ae452..2201ac8d1 100644
--- a/tests/writer.markdown
+++ b/tests/writer.markdown
@@ -2,7 +2,7 @@
 author:
 - John MacFarlane
 - Anonymous
-date: 'July 17, 2006'
+date: July 17, 2006
 title: Pandoc Test Suite
 ...