Skip to content

Comments

Fix PowerShell code blocks#13511

Merged
zanieb merged 1 commit intoastral-sh:mainfrom
h4iku:fix-codeblocks
May 18, 2025
Merged

Fix PowerShell code blocks#13511
zanieb merged 1 commit intoastral-sh:mainfrom
h4iku:fix-codeblocks

Conversation

@h4iku
Copy link
Contributor

@h4iku h4iku commented May 17, 2025

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.

Other places in the docs have removed the prompt completely to address this issue:

This PR updates the PowerShell prompt to PS> and changes the code fence language to pwsh-session to match the lexer name from Pygments. This allows the prompt to be correctly detected as a Generic.Prompt token and is stripped during copy.

Related: #12520

@zanieb
Copy link
Member

zanieb commented May 18, 2025

Oh, cool! Thanks for the explanation.

@zanieb zanieb added the documentation Improvements or additions to documentation label May 18, 2025
@zanieb zanieb merged commit d4e8df9 into astral-sh:main May 18, 2025
74 checks passed
@h4iku h4iku deleted the fix-codeblocks branch May 18, 2025 10:09
tmeijn pushed a commit to tmeijn/dotfiles that referenced this pull request May 20, 2025
This MR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [astral-sh/uv](https://github.com/astral-sh/uv) | patch | `0.7.5` -> `0.7.6` |

MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot).

**Proposed changes to behavior should be submitted there as MRs.**

---

### Release Notes

<details>
<summary>astral-sh/uv (astral-sh/uv)</summary>

### [`v0.7.6`](https://github.com/astral-sh/uv/blob/HEAD/CHANGELOG.md#076)

[Compare Source](astral-sh/uv@0.7.5...0.7.6)

##### Python

-   Add Python 3.14 on musl
-   Add free-threaded Python on musl
-   Add Python 3.14.0a7
-   Statically link `libpython` into the interpreter on Linux for a significant performance boost

See the
[`python-build-standalone` release notes](https://github.com/astral-sh/python-build-standalone/releases/tag/20250517)
for more details.

##### Enhancements

-   Improve compatibility of `VIRTUAL_ENV_PROMPT` value ([#&#8203;13501](astral-sh/uv#13501))
-   Bump MSRV to 1.85 and Edition 2024 ([#&#8203;13516](astral-sh/uv#13516))

##### Bug fixes

-   Respect default extras in uv remove ([#&#8203;13380](astral-sh/uv#13380))

##### Documentation

-   Fix PowerShell code blocks ([#&#8203;13511](astral-sh/uv#13511))

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this MR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box

---

This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0MC4xNS4wIiwidXBkYXRlZEluVmVyIjoiNDAuMTUuMCIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90Il19-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants