Provide a context object with the full app information
javiereguiluz opened this issue · 2 comments
When parsing a specific book I need to add Step 0, Step 1, etc. to <h1> headings of each article and also, inside each article, I need to number <h2> headings as 0.0', 0.1', 0.2, ..., 1.0, 1.1, 1.2, etc.
I created a TitleNodeRenderer but I can't get the name of the file being parsed, which is the one that contains both the book name and the chapter number. I wish we had a context object with all the essential parsing information available everywhere to unlock powerful features.
Thanks!
Note that Sphinx solves section numbers using a transformer/node visitor. Support for node visitors is something I wish to implement after finishing my security doc rewrite (doctrine/rst-parser#145)
Let's close this one. I never needed this again since I first reported this. Let's be flexible and adapt to how things are. Thanks!