]> git.ipfire.org Git - thirdparty/fastapi/fastapi.git/commitdiff
📝 Update includes for `docs/en/docs/advanced/response-directly.md` (#12803)
authorBaldeep Singh Handa <handabaldeep@gmail.com>
Sat, 9 Nov 2024 11:54:19 +0000 (11:54 +0000)
committerGitHub <noreply@github.com>
Sat, 9 Nov 2024 11:54:19 +0000 (11:54 +0000)
docs/en/docs/advanced/response-directly.md

index 8246b967406022adacd4f13a019eef097efcae16..09947a2ee7fbf6d74829d3df4dd24fec9bc691d3 100644 (file)
@@ -34,9 +34,7 @@ For example, you cannot put a Pydantic model in a `JSONResponse` without first c
 
 For those cases, you can use the `jsonable_encoder` to convert your data before passing it to a response:
 
-```Python hl_lines="6-7  21-22"
-{!../../docs_src/response_directly/tutorial001.py!}
-```
+{* ../../docs_src/response_directly/tutorial001.py hl[6:7,21:22] *}
 
 /// note | "Technical Details"
 
@@ -56,9 +54,7 @@ Let's say that you want to return an <a href="https://en.wikipedia.org/wiki/XML"
 
 You could put your XML content in a string, put that in a `Response`, and return it:
 
-```Python hl_lines="1  18"
-{!../../docs_src/response_directly/tutorial002.py!}
-```
+{* ../../docs_src/response_directly/tutorial002.py hl[1,18] *}
 
 ## Notes