currently, custom directives need to be registered globally, i.e.:
from docutils.parsers.rst import directives
directives.register_directive(directive_name, directive_class)
this is fine for applications. however, for libraries, it is very bad practice to pollute the namespace of the calling application. it would be great to support generalized per-parser directive registration.