CommonMark writer: do not use simple class for fenced-divs
In https://github.com/jgm/pandoc/pull/7242, we introduced a simple attribute style for for code blocks and fenced divs with a single class but turns out the CommonMark extension does not support it for fenced divs. https://github.com/jgm/commonmark-hs/blob/master/commonmark-extensions/test/fenced_divs.md
This commit is contained in:
parent
7a3ee9d3d8
commit
c550bf8482
1 changed files with 6 additions and 3 deletions
|
@ -322,9 +322,12 @@ blockToMarkdown' opts (Div attrs ils) = do
|
|||
case () of
|
||||
_ | isEnabled Ext_fenced_divs opts &&
|
||||
attrs /= nullAttr ->
|
||||
nowrap (literal ":::" <+> classOrAttrsToMarkdown attrs) $$
|
||||
chomp contents $$
|
||||
literal ":::" <> blankline
|
||||
let attrsToMd = if variant == Commonmark
|
||||
then attrsToMarkdown
|
||||
else classOrAttrsToMarkdown
|
||||
in nowrap (literal ":::" <+> attrsToMd attrs) $$
|
||||
chomp contents $$
|
||||
literal ":::" <> blankline
|
||||
| isEnabled Ext_native_divs opts ||
|
||||
(isEnabled Ext_raw_html opts &&
|
||||
(variant == Commonmark ||
|
||||
|
|
Loading…
Reference in a new issue