diff options
author | John MacFarlane <jgm@berkeley.edu> | 2021-12-05 11:26:01 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2021-12-05 11:26:01 -0800 |
commit | 36807db531d1b65a25fee9bf3afd4ece60f12041 (patch) | |
tree | 67b39529b06b6586b9a7946a3a015f0a4fe1261a /src/Text/Pandoc | |
parent | 51f6f0e3a1533a0e1bb94538f55bdc9db380a028 (diff) | |
download | pandoc-36807db531d1b65a25fee9bf3afd4ece60f12041.tar.gz |
Commonmark writer: allow ')' delimiters on ordered lists.
Diffstat (limited to 'src/Text/Pandoc')
-rw-r--r-- | src/Text/Pandoc/Writers/Markdown.hs | 7 |
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 |