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.
This commit is contained in:
parent
15816853a3
commit
dba066a33d
1 changed files with 2 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue