Allow plain to be used in raw attribute syntax.

This commit is contained in:
John MacFarlane 2021-11-04 10:11:57 -07:00
parent 4ea2baf814
commit 0b254ea4af
2 changed files with 4 additions and 2 deletions

View file

@ -399,7 +399,8 @@ blockToMarkdown' opts b@(RawBlock f str) = do
(literal "```" <> literal "\n")
let renderEmpty = mempty <$ report (BlockNotRendered b)
case variant of
PlainText -> renderEmpty
PlainText
| f == "plain" -> return $ literal str <> literal "\n"
Commonmark
| f `elem` ["gfm", "commonmark", "commonmark_x", "markdown"]
-> return $ literal str <> literal "\n"

View file

@ -459,7 +459,8 @@ inlineToMarkdown opts il@(RawInline f str) = do
literal (T.replicate numticks "`") <> literal "{=" <> literal fmt <> literal "}"
let renderEmpty = mempty <$ report (InlineNotRendered il)
case variant of
PlainText -> renderEmpty
PlainText
| f == "plain" -> return $ literal str
Commonmark
| f `elem` ["gfm", "commonmark", "commonmark_x", "markdown"]
-> return $ literal str