Re: [sphinx-users] Access to Sphinx AST before transforms/post-transforms

2020-08-09 Thread Matt McKay
Thanks Takeshi -- that is a nice idea. I will give that a shot. On Mon, Aug 10, 2020 at 12:22 PM Komiya Takeshi wrote: > 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 > >

Re: [sphinx-users] Access to Sphinx AST before transforms/post-transforms

2020-08-09 Thread Komiya Takeshi
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 : > > Hi Sphinx Group. > > Is there a way to access the Sphinx abstract syntax tree (AST) before any > transforms

Re: [sphinx-users] Attributes set to a node during the EnvironmentCollector vanishes

2020-08-09 Thread Komiya Takeshi
Hi, The collector.get_updated_docs() is called to detect output files that is needed to be re-generated. It is called just after the reading phase. It means the event is designed as read-only. For example, it is useful to detect files that is effected to the change of ToC numbers when a new

[sphinx-users] Access to Sphinx AST before transforms/post-transforms

2020-08-09 Thread Matt McKay
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

Re: [sphinx-users] Inviting Sphinx users to ask their questions on StackOverflow?

2020-08-09 Thread Yves Chevallier
I totally agree with you! On Sunday, August 9, 2020 at 12:02:30 AM UTC+2 Ken wrote: > Hi Yves, > > Stack Overflow is great for things in Question/Answer format. If the goal > is to also have general discussion on Sphinx topics, not necessarily around > questions, then Discourse

[sphinx-users] Attributes set to a node during the EnvironmentCollector vanishes

2020-08-09 Thread Yves Chevallier
I noticed a lot of complexity in Sphinx due to the fact the nodes cannot be altered during the EnvironmentCollector phase. However I don't understand why it works that way. For example, here below I would like to *tag* each `nodes.title` with an attribute, but as this is not the same

Re: [sphinx-users] Paragraphs around items in a list?

2020-08-09 Thread Yves Chevallier
Thanks for this! I have a better understanding now. On Sunday, August 9, 2020 at 10:33:16 AM UTC+2 matthia...@gmail.com wrote: > For reference, this has recently been discussed on the issue tracker: > https://github.com/sphinx-doc/sphinx/issues/7838. > > It looks like docutils made the decision

Re: [sphinx-users] Paragraphs around items in a list?

2020-08-09 Thread Matthias Geier
For reference, this has recently been discussed on the issue tracker: https://github.com/sphinx-doc/sphinx/issues/7838. It looks like docutils made the decision for the HTML5 writer to always keep elements and handle "compact" lists with CSS (instead of removing elements). At the time, this