Convert code to syntax highlighted html [closed]

点点圈 提交于 2020-12-29 13:12:38

问题


I am looking for a python module that will let me generate "syntax highlighted" HTML code out of a code written in any of the popular languages.

Something similar to what stackoverflow does with the code tag.


回答1:


You probably want pygments.

It highlights most popular languages and outputs to HTML, RDF, LaTeX, and many more.



来源:https://stackoverflow.com/questions/11366983/convert-code-to-syntax-highlighted-html

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!