Debian Codegraph @

docs/lib/cloud_sptheme.ext.escaped_samp_literals.rst

raw
1 ==================================================================================================
2 :mod:`cloud_sptheme.ext.escaped_samp_literals` - permits escaped bracket characters in *samp* role
3 ==================================================================================================
4
5 .. module:: cloud_sptheme.ext.escaped_samp_literals
6 :synopsis: support escaped bracket characters in SAMP role
7
8 Overview
9 ========
10 This extension modifies how ``:samp:`` literals are parsed, replacing
11 the default Sphinx parser with an alternate one that allows embedding
12 literal ``{`` and ``}`` characters within the content, as well providing
13 stricter input validation.
14
15 To embed a literal ``{``, just use a double-backslash, e.g::
16
17 :samp:`this is a {variable}, these are a literal \\{ and \\}`
18
19 ... and it will be rendered as:
20
21 :samp:`this is a {variable}, these are a literal \\{ and \\}`
22
23 Internals
24 =========
25 .. rst-class:: float-center
26
27 .. seealso::
28
29 This feature has been submitted to Sphinx as
30 `issue 789 <https://github.com/sphinx-doc/sphinx/issues/789>`_.
31 If/when that issue is resolved, this extension will be deprecated and removed.