This allows to inject set of directives and roles to RSTStateMachine on runtime. That allows custom reST parsers to switch own set of directives and roles on each parse.
This appears to be perhaps a partial solution to the issue I raised in https://sourceforge.net/p/docutils/bugs/401/, such that global variables should be removed in favour of passing them through the parsing chain.
Is this patch being considered?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This appears to be perhaps a partial solution to the issue I raised in https://sourceforge.net/p/docutils/bugs/401/, such that global variables should be removed in favour of passing them through the parsing chain.
Is this patch being considered?
things are speedier if there is documentation and tests (i assume you did
test the patch so why not pass this on)
in the patch.
the real hard thing for me to check is ... is this safe ... loading
directives into docutils
any thoughts help ?
Last edit: Günter Milde 2025-09-17
So I can think of any suitable tests, what would your definiton of safe be here?
you should . there was a discussion on docutils lists recently (1y) on code
injection
some general unittests/functional tests are mandatory (was in aegis SCM)
considerations remarks for the security documentation ?
Last edit: Günter Milde 2025-09-17
Supersedes [patches:#17].
Related
Patches:
#17Last edit: Günter Milde 2025-09-17