chatgpt-google-extension
chatgpt-google-extension copied to clipboard
code highlight
It appears that ChatGPT returns a markdown format. Using a markdown rendering library would make the results more readable.
That's definitely in the TODO
Hi there, I managed to get the CSS code highlighted but not the other languages : (
Here is the response from the API, as you can see it includes CSS after ```
It turns out the chatgpt API only response ``` without the language identifier for language like js, python, java and etc. The following screenshot shows part of the response when asking "blinking effect in javascript"

Shall I create a PR or shall we wait and see if anyone else has a better idea on code highlights? Cheers : )
I'm curious about your current approach
Added the highlightjs css file and used the code from markdown-it documentation as the following
https://markdown-it.github.io/markdown-it/

You could tryhljs.highlightAuto()