feat(frontend): Improve highlighting of code samples
What
- Rebased on the latest
mainfrom #1517
Add highlighting for the prompt marker in the code samples.
Refactor the html formatting so that the html tags are automatically generated and don't have to be written manually in the code samples sources.
From original PR:
format_html()is actually a poor man's pygments, but I did not want to introduce this dependency. However, switching to pygments would be straight forward, if one wants to have full-fledged highlighting at some point in the future.
Not sure whether it was not the case at the time of the original PR or whether I just didn't know, but sphinx depends on pygments, so it's available in your doc build environment and you could use that instead of this manual approach.
@timhoffm I'm not sure that we install docs deps where this is used, but I can check tomorrow. pygments is okay with me if it cleans up some cruft
I would lean towards using pygments.