linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sphinx.rst: Add note about code snippets embedded in the text
@ 2019-06-11 20:03 André Almeida
  2019-06-12  7:57 ` Jani Nikula
  2019-06-14 20:39 ` Jonathan Corbet
  0 siblings, 2 replies; 3+ messages in thread
From: André Almeida @ 2019-06-11 20:03 UTC (permalink / raw)
  To: linux-doc; +Cc: linux-kernel, corbet, kernel, André Almeida

There's a paragraph that explains how to create fixed width text block,
but it doesn't explains how to create fixed width text inline, although
this feature is really used through the documentation. Fix that adding a
quick note about it.

Signed-off-by: André Almeida <andrealmeid@collabora.com>
---
 Documentation/doc-guide/sphinx.rst | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Documentation/doc-guide/sphinx.rst b/Documentation/doc-guide/sphinx.rst
index c039224b404e..f48abc07f4c5 100644
--- a/Documentation/doc-guide/sphinx.rst
+++ b/Documentation/doc-guide/sphinx.rst
@@ -218,7 +218,7 @@ Here are some specific guidelines for the kernel documentation:
   examples, etc.), use ``::`` for anything that doesn't really benefit
   from syntax highlighting, especially short snippets. Use
   ``.. code-block:: <language>`` for longer code blocks that benefit
-  from highlighting.
+  from highlighting. For a short snippet of code embedded in the text, use \`\`.
 
 
 the C domain
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sphinx.rst: Add note about code snippets embedded in the text
  2019-06-11 20:03 [PATCH] sphinx.rst: Add note about code snippets embedded in the text André Almeida
@ 2019-06-12  7:57 ` Jani Nikula
  2019-06-14 20:39 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jani Nikula @ 2019-06-12  7:57 UTC (permalink / raw)
  To: André Almeida, linux-doc
  Cc: linux-kernel, corbet, kernel, André Almeida

On Tue, 11 Jun 2019, André Almeida <andrealmeid@collabora.com> wrote:
> There's a paragraph that explains how to create fixed width text block,
> but it doesn't explains how to create fixed width text inline, although
> this feature is really used through the documentation. Fix that adding a
> quick note about it.

I don't mind this addition, it's simple enough, but in general I think
we should reference the Sphinx and reStructuredText documentation,
whichever is more applicable, instead of duplicating the
documentation. The idea is that this document describes how to use them
in kernel. Contrast with coding style and language reference.

BR,
Jani.


>
> Signed-off-by: André Almeida <andrealmeid@collabora.com>
> ---
>  Documentation/doc-guide/sphinx.rst | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/doc-guide/sphinx.rst b/Documentation/doc-guide/sphinx.rst
> index c039224b404e..f48abc07f4c5 100644
> --- a/Documentation/doc-guide/sphinx.rst
> +++ b/Documentation/doc-guide/sphinx.rst
> @@ -218,7 +218,7 @@ Here are some specific guidelines for the kernel documentation:
>    examples, etc.), use ``::`` for anything that doesn't really benefit
>    from syntax highlighting, especially short snippets. Use
>    ``.. code-block:: <language>`` for longer code blocks that benefit
> -  from highlighting.
> +  from highlighting. For a short snippet of code embedded in the text, use \`\`.
>  
>  
>  the C domain

-- 
Jani Nikula, Intel Open Source Graphics Center

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] sphinx.rst: Add note about code snippets embedded in the text
  2019-06-11 20:03 [PATCH] sphinx.rst: Add note about code snippets embedded in the text André Almeida
  2019-06-12  7:57 ` Jani Nikula
@ 2019-06-14 20:39 ` Jonathan Corbet
  1 sibling, 0 replies; 3+ messages in thread
From: Jonathan Corbet @ 2019-06-14 20:39 UTC (permalink / raw)
  To: André Almeida; +Cc: linux-doc, linux-kernel, kernel

On Tue, 11 Jun 2019 17:03:16 -0300
André Almeida <andrealmeid@collabora.com> wrote:

> There's a paragraph that explains how to create fixed width text block,
> but it doesn't explains how to create fixed width text inline, although
> this feature is really used through the documentation. Fix that adding a
> quick note about it.
> 
> Signed-off-by: André Almeida <andrealmeid@collabora.com>

Applied, thanks.  But I do agree with Jani that we don't want to reproduce
the RST guide here.

jon

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-06-14 20:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-06-11 20:03 [PATCH] sphinx.rst: Add note about code snippets embedded in the text André Almeida
2019-06-12  7:57 ` Jani Nikula
2019-06-14 20:39 ` Jonathan Corbet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).