Hi, How about using a transform having a very high priority? Then you can access a doctree (a.k.a. AST) just after the parsed.
Thanks, Takeshi KOMIYA 2020年8月10日(月) 10:49 Matt McKay <mamc...@gmail.com>: > > Hi Sphinx Group. > > Is there a way to access the Sphinx abstract syntax tree (AST) before any > transforms or post-transforms are applied (i.e. directly after the parser > phase)? > > I am writing an extension to convert reST to Myst syntax but I am finding > restoring some of the information contained in the original rst file > difficult to recover. The key example is a `toctree` that uses the `:hidden:` > option appears to be dropped from the AST here > (https://github.com/sphinx-doc/sphinx/blob/e4a55cb76f7f45e74997017b8fa4ca913d0ac602/sphinx/environment/adapters/toctree.py#L65) > > Any tips / hints would be great -- thanks for your time. > > Cheers, > Matt > > -- > You received this message because you are subscribed to the Google Groups > "sphinx-users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to sphinx-users+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sphinx-users/1e767f7a-6a03-4a0d-a22d-4326716299c3o%40googlegroups.com. -- You received this message because you are subscribed to the Google Groups "sphinx-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to sphinx-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/sphinx-users/CAFmkQAP%3Du8_GVN%2BaiCUbXm%3D6_ZQGWk8BsubfiSd%3DR2ua7mGqhw%40mail.gmail.com.