From 82ad855f38b8fa8dc1cbfc14fa294dfd5f9f02ab Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Mon, 21 Jun 2021 08:49:00 -0700 Subject: Markdown writer: Fix regression in code blocks with attributes. Code blocks with a single class but nonempty attributes were having attributes drop as a result of #7242. Closes #7397. --- src/Text/Pandoc/Writers/Markdown.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Text') diff --git a/src/Text/Pandoc/Writers/Markdown.hs b/src/Text/Pandoc/Writers/Markdown.hs index 425ea07ca..b13ab57ee 100644 --- a/src/Text/Pandoc/Writers/Markdown.hs +++ b/src/Text/Pandoc/Writers/Markdown.hs @@ -256,10 +256,10 @@ noteToMarkdown opts num blocks = do then hang (writerTabStop opts) (marker <> spacer) contents else marker <> spacer <> contents --- | (Code) blocks with a single class can just use it standalone, --- no need to bother with curly braces. +-- | (Code) blocks with a single class and no attributes can just use it +-- standalone, no need to bother with curly braces. classOrAttrsToMarkdown :: Attr -> Doc Text -classOrAttrsToMarkdown ("",[cls],_) = literal cls +classOrAttrsToMarkdown ("",[cls],[]) = literal cls classOrAttrsToMarkdown attrs = attrsToMarkdown attrs -- | Ordered list start parser for use in Para below. -- cgit v1.2.3