Currently, when docutils.parsers.rst.roles.role() is given a role name to look up, it uses the lowercase form of the name for the actual lookups. However, in order for this to work properly, the register_canonical_role() and register_local_role() functions that store roles in _roles have to store the lowercase forms of the role names, which they currently do not do. As a result, input like the following fails:
.. role:: TODO
:TODO:`Fix this.`
The attached patch modifies the register_*_role() functions to store the lowercase forms of role names.
Applied in revision 8571.
Thank you for the patch.
Fixed in Docutils 0.17.
Thanks again for your contribution.