XML Role
The docutils restructuredText parser does not support nesting roles
or formatting markup. This makes it impossible to, for example, have a
monospace-formatted ref
link without making a sphinx extension
providing each possible permutation of formatting.
The xml
role in the xmlrole
extension allows you to express
formatting using XML. It accepts the following tags:
Tag | Attributes | Description |
---|---|---|
| Emphasize the contained text. Typically renders as italics. | |
| Render the contained text in a monospace font. | |
| Render the contained text in a bold font. | |
|
| Create a link to the docutils reference indicated by |
|
| Create a link to a URL indicated by |
For example:
:xml:`<mono><ref target="binary-bson-dumps"></ref></mono>` :xml:`<strong>See: <link target="https://example.com">An Example Link</link></strong>`