Markdown writer: Commas are okay in plain yaml scalars.
It's just commas with brackets that can cause problems.
This commit is contained in:
parent
e7a68fc7e8
commit
9009a7e4a8
2 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
author:
|
||||
- John MacFarlane
|
||||
- Anonymous
|
||||
date: 'July 17, 2006'
|
||||
date: July 17, 2006
|
||||
title: Pandoc Test Suite
|
||||
...
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue