C++语法高亮 html 生成器

发布于 2024-12-01 21:24:00 字数 127 浏览 3 评论 0 原文

我正在为我的公司博客撰写博客文章,我希望代码片段能够以语法突出显示的方式显示。

我能做的就是写html/css。

是否有任何应用程序/网络应用程序可以让我粘贴 C++ 代码片段并获取一段突出显示的 html?

I'm writing blog posts for my company blog and I would like code snippets to show up with syntax highlighting.

All I can do is write html/css.

Is there any app/webapp that will let me paste in a c++ code snippet and get a chunk of html with the highlighting?

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(4

绳情 2024-12-08 21:24:01

查看 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.

伴梦长久 2024-12-08 21:24:00

试试这个在线语法高亮站点,尤其是C++ 部分

你粘贴你的代码,它就会完成艰苦的工作。

Try this Online syntax highlighting Site, and especially the C++ section.

You paste in your code and it does the hard work.

少年亿悲伤 2024-12-08 21:24:00

我使用 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.

微凉 2024-12-08 21:24:00

对于其他寻找此问题解决方案的人 - 您应该查看:

http://oneqonea.blogspot.com/2012/04/how-do-i-add-syntax-highlighting-to-my.html

这是一个非常简单的“SyntaxHighlighter for Blogger”教程,包含屏幕截图和所有内容。

您只需几分钟即可启动并运行。

另外,对于您的 C++ 应用程序,请确保您的 中引用了 shBrushCpp.js 库。像这样的部分:

<head>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js' type='text/javascript'/>
</head>

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:

<head>
    <script src='http://alexgorbatchev.com/pub/sh/current/scripts/shBrushCpp.js' type='text/javascript'/>
</head>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文