C++语法高亮 html 生成器
我正在为我的公司博客撰写博客文章,我希望代码片段能够以语法突出显示的方式显示。
我能做的就是写html/css。
是否有任何应用程序/网络应用程序可以让我粘贴 C++ 代码片段并获取一段突出显示的 html?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我正在为我的公司博客撰写博客文章,我希望代码片段能够以语法突出显示的方式显示。
我能做的就是写html/css。
是否有任何应用程序/网络应用程序可以让我粘贴 C++ 代码片段并获取一段突出显示的 html?
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(4)
查看 http://www.syntaxhighlight.com - 支持 222 种语言。粘贴您的代码并获取格式化的 html。
Have a look at http://www.syntaxhighlight.com - supporting 222 languages. Paste your code and get the formatted html.
试试这个在线语法高亮站点,尤其是C++ 部分。
你粘贴你的代码,它就会完成艰苦的工作。
Try this Online syntax highlighting Site, and especially the C++ section.
You paste in your code and it does the hard work.
我使用 emacs MXhtmlize-bufferRET。此外,enscript 非常强大,可以从许多源代码格式生成彩色 HTML。
I use emacs M-Xhtmlize-bufferRET. Also enscript is very powerful to generate colorized HTML from many source code formats.
对于其他寻找此问题解决方案的人 - 您应该查看:
http://oneqonea.blogspot.com/2012/04/how-do-i-add-syntax-highlighting-to-my.html
这是一个非常简单的“SyntaxHighlighter for Blogger”教程,包含屏幕截图和所有内容。
您只需几分钟即可启动并运行。
另外,对于您的 C++ 应用程序,请确保您的 中引用了 shBrushCpp.js 库。像这样的部分:
For others looking for a solution to this problem - you should checkout:
http://oneqonea.blogspot.com/2012/04/how-do-i-add-syntax-highlighting-to-my.html
It's a really easy "SyntaxHighlighter for Blogger" tutorial with screenshots and everything.
You should be up and running in only a few minutes.
Also, for your C++ application, make sure you have the shBrushCpp.js library referenced in your <head></head> section like this: