PSphinxTheme.ext.escaped_samp_literals

Overview

permits escaped bracket characters in “samp” role

This extension modifies how :samp: literals are parsed, replacing the default Sphinx parser with an alternate one that allows embedding literal { and } characters within the content, as well providing stricter input validation.

Important

To embed a literal {

within normal docs just use a double-backslash to escape it

within docstrings one needs triple-backslash to escape it

... using triple-backslash to escape it and it will be rendered as:

this is a variable, these are a literal { and }

Internals

Note

This feature has been submitted to the Sphinx issue tracker. If and when the patch is accepted (or an alternative is added to Sphinx), this extension will be deprecated and eventually removed.