You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to write an sphinx autodoc module with support for both rst and markdown, but I am hitting a wall w.r.t. finding out what is the current node's parser. Specifically we have 3 scenarios where the directive is being executed:
.. domain:autodoc:: path
```{domain:autodoc} path
```
```{eval-rst}.. domain:autodoc:: path```
Using env.parser.supports() it could work for the first 2 cases (not sure if the env is adjusted for each document?), but it fails for the 3rd because it is still a MystParser there. Another option would be to check state.state_machine, which seems more reliable, but it would be nice to have a method that does not rely on isinstance().
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am trying to write an sphinx autodoc module with support for both rst and markdown, but I am hitting a wall w.r.t. finding out what is the current node's parser. Specifically we have 3 scenarios where the directive is being executed:
Using
env.parser.supports()
it could work for the first 2 cases (not sure if theenv
is adjusted for each document?), but it fails for the 3rd because it is still aMystParser
there. Another option would be to checkstate.state_machine
, which seems more reliable, but it would be nice to have a method that does not rely onisinstance()
.Anyone got some development tips here?
Beta Was this translation helpful? Give feedback.
All reactions