On 17:47-20230824, Heinrich Schuchardt wrote: > On 24.08.23 17:40, Nishanth Menon wrote: > > Sphinx-prompt[1] helps bring-in '.. prompt::' option that allows a > > better rendered documentation, yet be able to copy paste without > > picking up the prompt from rendered documentation. > > > > [1] https://lore.kernel.org/all/87fs48rgto....@baylibre.com/ > > Suggested-by: Mattijs Korpershoek <mkorpersh...@baylibre.com> > > Signed-off-by: Nishanth Menon <n...@ti.com> > > Looks good to me. > > > --- > > Version picked is the best that works with Sphinx 3.4.3 > > > > doc/conf.py | 2 +- > > doc/sphinx/requirements.txt | 1 + > > 2 files changed, 2 insertions(+), 1 deletion(-) > > > > diff --git a/doc/conf.py b/doc/conf.py > > index 00f241366477..5e2ff1c8f5e2 100644 > > --- a/doc/conf.py > > +++ b/doc/conf.py > > @@ -39,7 +39,7 @@ needs_sphinx = '2.4.4' > > extensions = ['kerneldoc', 'rstFlatTable', 'kernel_include', > > 'kfigure', 'sphinx.ext.ifconfig', # 'automarkup', > > 'maintainers_include', 'sphinx.ext.autosectionlabel', > > - 'kernel_abi', 'kernel_feat'] > > + 'kernel_abi', 'kernel_feat', 'sphinx-prompt'] > > We copied our conf.py from kernel.org. Please, check if it can be added > upstream.
https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git/tree/Documentation/sphinx/requirements.txt Looks pretty different though :( > > /linux$ scripts/get_maintainer.pl Documentation/conf.py > Jonathan Corbet <cor...@lwn.net> (maintainer:DOCUMENTATION) > linux-...@vger.kernel.org (open list:DOCUMENTATION) > linux-ker...@vger.kernel.org (open list) > b...@vger.kernel.org (open list:BPF [MISC]) > > Does the extension exist on their minimum Sphinx version (1.7) or at least > on the 2.24 in Documentation/requirements.txt? Trying things out, looks like sphinx-prompt 1.5.0 will work with 2.4.4 as well. I am just a sphinx newbie.. I can propose, but taking the job up of a massive Documentation cleanup across kernel documentation is a bit beyond my availability. If you think this is the way forward, then I can propose to the kernel list. > > Best regards > > Heinrich > > > # > > # cdomain is badly broken in Sphinx 3+. Leaving it out generates *most* > > diff --git a/doc/sphinx/requirements.txt b/doc/sphinx/requirements.txt > > index 4f411f78d030..6ccbe527ee79 100644 > > --- a/doc/sphinx/requirements.txt > > +++ b/doc/sphinx/requirements.txt > > @@ -15,6 +15,7 @@ requests==2.31.0 > > six==1.16.0 > > snowballstemmer==2.2.0 > > Sphinx==3.4.3 > > +sphinx-prompt==1.5.0 > > sphinx-rtd-theme==1.0.0 > > sphinxcontrib-applehelp==1.0.2 > > sphinxcontrib-devhelp==1.0.2 > -- Regards, Nishanth Menon Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3 1A34 DDB5 849D 1736 249D