Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f20e3b8

Browse files
apteryksMrMino
authored andcommitted
utils: coloransi: Escape Unicode U0001 and U0002 non-printable characters.
Fixes #13637. These Unicode characters, would cause problems when processed by LaTeX to generate the info or PDF documentation targets. * IPython/utils/coloransi.py (InputTermColors): Escape the backslashes in \001 and \002 so that they are shown as literals '\001' and '\002' strings in the Sphinx-generated documentation rather than as non-printable Unicode characters.
1 parent 71d665c commit f20e3b8

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

IPython/utils/coloransi.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,8 +74,8 @@ class TermColors:
7474
class InputTermColors:
7575
"""Color escape sequences for input prompts.
7676
77-
This class is similar to TermColors, but the escapes are wrapped in \001
78-
and \002 so that readline can properly know the length of each line and
77+
This class is similar to TermColors, but the escapes are wrapped in \\001
78+
and \\002 so that readline can properly know the length of each line and
7979
can wrap lines accordingly. Use this class for any colored text which
8080
needs to be used in input prompts, such as in calls to raw_input().
8181

0 commit comments

Comments
 (0)