From 127a311b34cfb2db7ba2d2f40eab965355a86ace Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Fri, 14 Aug 2026 14:43:46 +0200 Subject: [PATCH] [DOCS] literalinclude: marker-based selection hint Mentions the partial-inclusion options (`:lines:`, and the more edit-robust `:start-after:`/`:end-before:` markers) and links the underscore naming convention for include-only files. Signed-off-by: Sebastian Mendel --- .../Reference/ReStructuredText/Code/Codeblocks.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/Reference/ReStructuredText/Code/Codeblocks.rst b/Documentation/Reference/ReStructuredText/Code/Codeblocks.rst index 50d42956..19eb3e4c 100644 --- a/Documentation/Reference/ReStructuredText/Code/Codeblocks.rst +++ b/Documentation/Reference/ReStructuredText/Code/Codeblocks.rst @@ -377,6 +377,12 @@ code block. :emphasize-lines: 5,10-13 :linenos: +The directive can display parts of a file, for example with :rst:`:lines:` +or — more robust against later edits — with the markers :rst:`:start-after:` +and :rst:`:end-before:` around a named region. Store include-only files with +a leading underscore (:file:`_Example.yaml`), as described in the +:ref:`file structure conventions `. + See also `literalinclude directive `__.