docutilsディレクティブ:role
https://docutils.sourceforge.io/docs/ref/rst/directives.html#custom-interpreted-text-roles
The "role" directive dynamically creates a custom interpreted text role and registers it with the parser.
(積ん読)reStructuredText Interpreted Text Roles
.. role:: custom
code:example.rst
An example of using :custom:interpreted text
code:generated
<paragraph>
An example of using
<inline classes="custom">
interpreted text
.. role:: custom(emphasis)とすると生成される木でinlineがemphasisに変わる
raw-roleというものもある(TODO)
ロールを自分で追加する方向性もある
(積ん読)Creating reStructuredText Interpreted Text Roles