From b41978843045b49ad5b65de1d791277ba94604dc Mon Sep 17 00:00:00 2001 From: Patrick Wehbe Date: Sat, 20 Jun 2026 22:20:22 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=9D=20Fix=20copy=20button=20copying=20?= =?UTF-8?q?HTML=20markup=20on=20Termynal=20command=20lines?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Several docs have terminal input lines written with HTML coloring, like `$ fastapi dev`. Termynal animates the input using textContent, so the tags never render on screen, but the Material copy button reads the underlying code and copies the literal markup. Users end up pasting `fastapi dev` instead of the command. Strip the HTML wrappers from only the `$` input command lines so the copy button yields the plain command, matching the homepage block which already uses the plain form. The colored output lines below each command are left unchanged. See discussion #15700. --- docs/en/docs/deployment/manually.md | 2 +- docs/en/docs/deployment/server-workers.md | 2 +- docs/en/docs/fastapi-cli.md | 2 +- docs/en/docs/tutorial/first-steps.md | 2 +- docs/en/docs/tutorial/index.md | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/en/docs/deployment/manually.md b/docs/en/docs/deployment/manually.md index ed49aa00ac..554a9bb590 100644 --- a/docs/en/docs/deployment/manually.md +++ b/docs/en/docs/deployment/manually.md @@ -7,7 +7,7 @@ In short, use `fastapi run` to serve your FastAPI application:
```console -$ fastapi run main.py +$ fastapi run main.py FastAPI Starting production server 🚀 diff --git a/docs/en/docs/deployment/server-workers.md b/docs/en/docs/deployment/server-workers.md index fb0741acb2..ec94edaf0e 100644 --- a/docs/en/docs/deployment/server-workers.md +++ b/docs/en/docs/deployment/server-workers.md @@ -36,7 +36,7 @@ If you use the `fastapi` command:
```console -$ fastapi run --workers 4 main.py +$ fastapi run --workers 4 main.py FastAPI Starting production server 🚀 diff --git a/docs/en/docs/fastapi-cli.md b/docs/en/docs/fastapi-cli.md index 9d8f415d9b..270c0c2906 100644 --- a/docs/en/docs/fastapi-cli.md +++ b/docs/en/docs/fastapi-cli.md @@ -9,7 +9,7 @@ To run your FastAPI app for development, you can use the `fastapi dev` command:
```console -$ fastapi dev +$ fastapi dev FastAPI Starting development server 🚀 diff --git a/docs/en/docs/tutorial/first-steps.md b/docs/en/docs/tutorial/first-steps.md index afef393417..44d5b62c0d 100644 --- a/docs/en/docs/tutorial/first-steps.md +++ b/docs/en/docs/tutorial/first-steps.md @@ -11,7 +11,7 @@ Run the live server:
```console -$ fastapi dev +$ fastapi dev FastAPI Starting development server 🚀 diff --git a/docs/en/docs/tutorial/index.md b/docs/en/docs/tutorial/index.md index 9e73579199..d97bb52b53 100644 --- a/docs/en/docs/tutorial/index.md +++ b/docs/en/docs/tutorial/index.md @@ -15,7 +15,7 @@ To run any of the examples, copy the code to a file `main.py`, and start `fastap
```console -$ fastapi dev +$ fastapi dev FastAPI Starting development server 🚀