[<prev] [next>] [day] [month] [year] [list]
Message-ID: <20230603225506.GA306244@madhu-kernel>
Date: Sat, 3 Jun 2023 17:55:06 -0500
From: Madhumitha Prabakaran <madhumithabiw@...il.com>
To: rdunlap@...radead.org, bagasdotme@...il.com,
ivan.orlov0322@...il.com, lenb@...nel.org,
linux-acpi@...r.kernel.org, linux-doc@...r.kernel.org,
linux-kernel@...r.kernel.org, rafael@...nel.org,
skhan@...uxfoundation.org, Akira Yokosawa <akiyks@...il.com>
Cc: madhumithabiw@...il.com
Subject: Re: Fwd: [PATCH] docs: Fix warning:Error in "code-block" directive
On Sat, Jun 03, 2023 at 01:52:46PM -0500, Madhumitha Prabakaran wrote:
> Date: Sat, 3 Jun 2023 13:52:46 -0500
> From: Madhumitha Prabakaran <madhumithabiw@...il.com>
> To: Madhumitha Prabakaran <madhumithabiw@...il.com>
> Subject: Fwd: [PATCH] docs: Fix warning:Error in "code-block" directive
>
> ---------- Forwarded message ---------
> From: Akira Yokosawa <akiyks@...il.com>
> Date: Fri, 2 Jun 2023 at 23:04
> Subject: Re: [PATCH] docs: Fix warning:Error in "code-block" directive
> To: <rdunlap@...radead.org>
> Cc: <bagasdotme@...il.com>, <ivan.orlov0322@...il.com>, <lenb@...nel.org>, <
> linux-acpi@...r.kernel.org>, <linux-doc@...r.kernel.org>, <
> linux-kernel@...r.kernel.org>, <madhumithabiw@...il.com>, <rafael@...nel.org>,
> <skhan@...uxfoundation.org>, Akira Yokosawa <akiyks@...il.com>
>
>
> On Fri, 2 Jun 2023 18:41:46 -0700, Randy Dunlap wrote:
> > On 6/2/23 18:20, Bagas Sanjaya wrote:
> >> On Fri, Jun 02, 2023 at 04:51:02PM -0500, Madhumitha Prabakaran wrote:
> >>> Fix the error in "code-block" directive by providing the
> >>> argument as "text".
> >>>
> >>> <snipped> ...
> >>> Result code:
> >>> ------------
> >>>
> >>> -.. code-block::
> >>> +.. code-block:: text
> >>
> >> Nope.
> >>
> >> I don't see error you mention in this patch when making htmldocs on my
> >> computer (my setup is pretty standard: see
> >> Documentation/doc-guide/sphinx.rst). This patch is unneccessary, though,
I did executed "make htmldocs" on sphinx-build 1.8.5 and sphinx_2.4.4, which throws the warning but on executing the same on sphinx_7.1.0 - one
can't see the warning
I skip the patch.
Thanks
> >> unless you have code snippets in some language (e.g. C, where passing
> >> language name to code-block:: syntax-highlight it). Result code outputs,
> >> on the other hand, are generic text with no definitive syntax, hence
> >> you can omit language name.
> >>
> >> Thanks.
> >
> >
> > I also don't see any such warnings so I don't see a need for this patch.
> > My wild guess is that some older version of Sphinx was being used.
>
Yeah, your are right.
On executing the make htmldocs, it clearly throws the warning
"WARNING: support for Sphinx < 2.4 will be removed soon"
My ignorance.
Thanks for pointing it.
> Right.
>
> In Sphinx changelog, "Features added" for 2.0.0b1 [1] lists this:
>
> #1851: Allow to omit an argument for code-block directive. If omitted,
> it follows highlight or highlight_language
>
> [1]: https://www.sphinx-doc.org/en/master/changes.html#id1306
>
Thanks for the changelog reference and reasoning.
Madhumitha
> Pre-2.0 Sphinx is now deprecated.
> See commit 31abfdda6527 ("docs: Deprecate use of Sphinx < 2.4.x").
>
> Thanks, Akira
>
> >
> > --
> > ~Randy
Powered by blists - more mailing lists