From 30470b0ba8326e705f37a41b96cc0d5d80f3144c Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Mon, 23 Feb 2026 18:14:43 +0100 Subject: [PATCH 1/2] fix: correct broken backslash display and enhance escape characters section The :rst: text role cannot render a lone backslash because `\` before the closing backtick is interpreted as an escape sequence by the RST parser. Replace with inline literal (double backticks) and add more escape examples. Relates: #507 --- Documentation/Basics/RstCheatSheet.rst | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Documentation/Basics/RstCheatSheet.rst b/Documentation/Basics/RstCheatSheet.rst index 38e78c21..975731d4 100644 --- a/Documentation/Basics/RstCheatSheet.rst +++ b/Documentation/Basics/RstCheatSheet.rst @@ -192,12 +192,25 @@ Or like this: Escape characters ================= -If you want to use a character, which would create some special reST markup, -with its normal meaning, you must escape it with a prepended :rst:`\`. +If you want to use a character that would normally create reST markup, +you must escape it with a prepended backslash (``\``). -For example surrounding text with "*" signs normally makes it show up in italics. By -escaping the special characters "*" you make the stars normal text characters: +For example, surrounding text with ``*`` normally makes it show up in italics. +By escaping the ``*`` you make them normal text characters: .. code-block:: rst \*non-italic\* + +Other common cases: + +.. code-block:: rst + + \`not a text role\` + \_not_a_reference + \\literal backslash + +.. note:: + Inside :ref:`code blocks ` + and inline code (backticks), escaping is not needed — content is displayed + literally. From b3176727a0b7afd7a570c2f2dc03299f8e0c09d3 Mon Sep 17 00:00:00 2001 From: Sebastian Mendel Date: Mon, 23 Feb 2026 18:38:57 +0100 Subject: [PATCH 2/2] fix: show source and result for all escape examples Consolidate escape examples into a single code block with rendered output below, following the source/result pattern used elsewhere in the cheat sheet. --- Documentation/Basics/RstCheatSheet.rst | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/Documentation/Basics/RstCheatSheet.rst b/Documentation/Basics/RstCheatSheet.rst index 975731d4..216b348f 100644 --- a/Documentation/Basics/RstCheatSheet.rst +++ b/Documentation/Basics/RstCheatSheet.rst @@ -195,21 +195,20 @@ Escape characters If you want to use a character that would normally create reST markup, you must escape it with a prepended backslash (``\``). -For example, surrounding text with ``*`` normally makes it show up in italics. -By escaping the ``*`` you make them normal text characters: - -.. code-block:: rst - - \*non-italic\* - -Other common cases: - .. code-block:: rst + \*not italic\* \`not a text role\` - \_not_a_reference + \_not\_a\_reference \\literal backslash +Looks like this: + +| \*not italic\* +| \`not a text role\` +| \_not\_a\_reference +| \\literal backslash + .. note:: Inside :ref:`code blocks ` and inline code (backticks), escaping is not needed — content is displayed