Skip to content

Commit 97cd15b

Browse files
committed
docs(console): move the emoji comment
1 parent e965e50 commit 97cd15b

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎plain2code_console.py‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,6 @@ class Plain2CodeConsole(Console):
2727
DEBUG_STYLE = Style(color="purple")
2828

2929
def __init__(self):
30-
# Emoji shortcodes must never be substituted. Set on the console because the
31-
# emoji flag of Console.print does not reach text inside renderables like Tree.
3230
super().__init__(emoji=False)
3331
try:
3432
import tiktoken
@@ -71,7 +69,7 @@ def _log_and_print(self, level, base_style, args, color, kwargs):
7169
# Messages must render exactly as logged and not pick its own styling:
7270
# -- no Rich markup (via square brackets) in interpolated content (error texts, file names)
7371
# -- no repr highlighter restyling brackets and numbers inside them.
74-
# -- emoji are off console-wide via __init__
72+
# -- no emoji substitution, but it's set False in __init__, otherwise it won't reach renderables like Trees
7573
kwargs.setdefault("markup", False)
7674
kwargs.setdefault("highlight", False)
7775
super().print(*args, **kwargs, style=style)

0 commit comments

Comments
 (0)