From dba066a33def2635567dc790f04387a06297e903 Mon Sep 17 00:00:00 2001 From: Daniel Bergey Date: Mon, 8 Dec 2014 16:41:18 +0000 Subject: RST: literal role should produce Code, code role should have "code" class. http://docutils.sourceforge.net/docs/ref/rst/roles.html says that `text`:literal` is the same as ``text``. docutils outputs a element in both cases, whereas for the code role, it outputs a element with the "code" class. --- src/Text/Pandoc/Readers/RST.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/Text/Pandoc') diff --git a/src/Text/Pandoc/Readers/RST.hs b/src/Text/Pandoc/Readers/RST.hs index 20729e09a..98d43221b 100644 --- a/src/Text/Pandoc/Readers/RST.hs +++ b/src/Text/Pandoc/Readers/RST.hs @@ -1006,12 +1006,12 @@ renderRole contents fmt role attr = case role of "RFC" -> return $ rfcLink contents "pep-reference" -> return $ pepLink contents "PEP" -> return $ pepLink contents - "literal" -> return $ B.str contents + "literal" -> return $ B.codeWith attr contents "math" -> return $ B.math contents "title-reference" -> titleRef contents "title" -> titleRef contents "t" -> titleRef contents - "code" -> return $ B.codeWith attr contents + "code" -> return $ B.codeWith (union attr ["code"]) contents "raw" -> return $ B.rawInline (fromMaybe "" fmt) contents custom -> do customRole <- stateRstCustomRoles <$> getState -- cgit v1.2.3