feature: try to detect language from filename for syntax highlighting
miketheman opened this issue · 5 comments
miketheman commented
Source:
inspector/inspector/templates/code.html
Lines 8 to 9 in 1ef5cda
When viewing a non-python file via Inspector, like a README.md, the browser highlights the contents incorrectly.
Prism supports a lot of languages and advises on using their autoloader for languages.
saip007 commented
hi @di, Can I work on the issue?
I have tested the changes locally, Should I need to add all languages or only a few
di commented
Sure! Seems like we should support all languages that Prism supports, via the autoloader.
saip007 commented
Should I use the CDNs provided from PrismJS
di commented
I don't think so, we should include it here as a static file similar to: https://github.com/pypi/inspector/tree/main/inspector/static
saip007 commented
Okay