aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/Text/Pandoc/Writers/Markdown.hs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs
index 96de5e0cd..022dbc24f 100644
--- a/src/Text/Pandoc/Writers/Markdown.hs
+++ b/src/Text/Pandoc/Writers/Markdown.hs
@@ -588,7 +588,12 @@ blockToMarkdown' opts (OrderedList (start,sty,delim) items) = do
then start
else 1
let sty' = if isEnabled Ext_fancy_lists opts then sty else DefaultStyle
- let delim' = if isEnabled Ext_fancy_lists opts then delim else DefaultDelim
+ let delim' = if isEnabled Ext_fancy_lists opts
+ then delim
+ else if variant == Commonmark &&
+ (delim == OneParen || delim == TwoParens)
+ then OneParen -- commonmark only supports one paren
+ else DefaultDelim
let attribs = (start', sty', delim')
let markers = orderedListMarkers attribs
let markers' = map (\m -> if T.length m < 3