For my documentation, I want escape special characters.
Example :
.. code-block:: terminal
$ php bin/console test:user
Press <return> for continue
For Sphinx, it's an external URL <return> and I want escape that.
Screenshot :

See Escaping Mechanism:
A backslash followed by any character (except whitespace characters in non-URI contexts) escapes that character. The escaped character represents the character itself, and is prevented from playing a role in any markup interpretation. The backslash is removed from the output.
To answer your question, you can use various markup techniques.
Escape the opening and closing brackets.
Press \<return\> for continue
Use inline literal markup.
Press ``<return>`` for continue
Use semantic markup with the kbd role:
Press :kbd:`<return>` for continue
IMO, the last option is the most appropriate for this situation. The first option is the least appropriate.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With