Fix PowerShell code blocks (#13511)

<!--
Thank you for contributing to uv! To help us out with reviewing, please
consider the following:

- Does this pull request include a summary of the change? (See below.)
- Does this pull request include a descriptive title?
- Does this pull request include references to any relevant issues?
-->

## Summary

The PowerShell prompt is not `$`, so it is not detected as a
`Generic.Prompt` token by Pygments lexers. Therefore, the JavaScript
code does not strip the prompt when copying from PowerShell code blocks,
such as
[here](https://docs.astral.sh/uv/getting-started/installation/#__tabbed_5_2).

Other places in the docs have removed the prompt completely to address
this issue:
* https://docs.astral.sh/uv/guides/projects/#__tabbed_1_2
* https://docs.astral.sh/uv/guides/integration/jupyter/#__tabbed_1_2

This PR updates the PowerShell prompt to `PS>` and changes the code
fence language to `pwsh-session` to match the lexer name from
[Pygments](https://pygments.org/docs/lexers/#pygments.lexers.shell.PowerShellSessionLexer).
This allows the prompt to be correctly detected as a `Generic.Prompt`
token and is stripped during copy.

Related: https://github.com/astral-sh/uv/pull/12520
This commit is contained in:
Reza Gharibi
2025-05-18 05:36:48 +03:30
committed by GitHub
parent 4b7f5f1103
commit d4e8df9b94
6 changed files with 25 additions and 25 deletions
+2 -2
View File
@@ -53,8 +53,8 @@ The virtual environment can be "activated" to make its packages available:
=== "Windows"
```console
$ .venv\Scripts\activate
```pwsh-session
PS> .venv\Scripts\activate
```
!!! note