Skip to content

Commit 5749a07

Browse files
committed
docs(widgets): correct Pygments class name for "console" alias
``get_lexer_by_name("console")`` returns ``BashSessionLexer`` (``pygments/lexers/shell.py:223``, alias registration at line 230), which extends ``ShellSessionBaseLexer``. There is no class literally named ``ShellSessionLexer``. The behavioural claim in the comment -- that the lexer tags ``$ `` as ``Generic.Prompt`` and emits ``<span class="gp">`` -- is unchanged and still correct.
1 parent e7bf0b9 commit 5749a07

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

docs/_ext/widgets/mcp_install.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def build_panels(
158158
Panel(
159159
client=client,
160160
method=method,
161-
# "console" = ShellSessionLexer — recognises the leading
161+
# "console" = BashSessionLexer -- recognises the leading
162162
# ``$ `` as Generic.Prompt and emits ``<span class="gp">``,
163163
# which the gp-sphinx copybutton regex strips on copy.
164164
language="json" if is_json else "console",

0 commit comments

Comments
 (0)