diff options
author | Daniel Bergey <bergey@alum.mit.edu> | 2014-12-08 16:41:18 +0000 |
---|---|---|
committer | Daniel Bergey <bergey@alum.mit.edu> | 2014-12-12 14:45:44 +0000 |
commit | dba066a33def2635567dc790f04387a06297e903 (patch) | |
tree | 9942841d2fa3f9c7a6c8b0ee89ad77f4df75e0ed /src/Text/Pandoc/Readers | |
parent | 15816853a3611a96994842a34a975e91c253c7ab (diff) | |
download | pandoc-dba066a33def2635567dc790f04387a06297e903.tar.gz |
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 <literal>
element in both cases, whereas for the code role, it outputs a <literal>
element with the "code" class.
Diffstat (limited to 'src/Text/Pandoc/Readers')
-rw-r--r-- | src/Text/Pandoc/Readers/RST.hs | 4 |
1 files changed, 2 insertions, 2 deletions
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 |