So we have built an API using FastAPI and for the documentation of the API we first used markdown and passed it while initializing the FastAPI object something like this
main = FastAPI(
root_path="/public",
title="API",
description="""{}""".format(open("public/app/description.md").read()),
)
In our description.md file, we had used the markdowns code block feature which highlights the syntax. The syntax which we used is using backticks with programming language name next to it so that it highlights the keywords just like any text editor. for ex :

Now once we run the app and navigate to http://localhost/public/docs FastAPI strips down any styling and puts it as plain text but we want it to be shown just like it is seen in the image above. This how it looks after stripping down the styling.

We also tried using HTML/CSS but in that also FastAPI strips down the styling and renders HTML as plain text. Can someone please guide us in achieving the syntax highlighting for the FastAPI docs so that when we go to /docs our code blocks syntax highlighting remains intact Any help or leads appreciated