Module
docutils.parsers.rst.roles

This module defines standard interpreted text role functions, a registry for interpreted text roles, and an API for adding to and retrieving from the registry.

The interface for interpreted role functions is as follows:

def role_fn(name, rawtext, text, lineno, inliner,
            options={}, content=[]):
    code...

# Set function attributes for customization:
role_fn.options = ...
role_fn.content = ...

Parameters:

Function attributes for customization, interpreted by the "role" directive:

Note that unlike directives, the "arguments" function attribute is not supported for role customization. Directive arguments are handled by the "role" directive itself.

Interpreted role functions return a tuple of two values: