Menu

#174 Lowercase new role names on registration

None
closed-accepted
nobody
None
5
2021-04-03
2020-10-20
No

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.

1 Attachments

Discussion

  • Günter Milde

    Günter Milde - 2020-10-28
    • status: open --> open-accepted
     
  • Günter Milde

    Günter Milde - 2020-10-28

    Applied in revision 8571.
    Thank you for the patch.

     
  • Günter Milde

    Günter Milde - 2021-04-03
    • status: open-accepted --> closed-accepted
     
  • Günter Milde

    Günter Milde - 2021-04-03

    Fixed in Docutils 0.17.
    Thanks again for your contribution.

     

Log in to post a comment.

MongoDB Logo MongoDB
Gen AI apps are built with MongoDB Atlas
Atlas offers built-in vector search and global availability across 125+ regions. Start building AI apps faster, all in one place.