用于在 BlogSpot 上写博客的 C# 语法荧光笔
我正在为我在 BlogSpot 上的博客寻找语法荧光笔兼代码格式化程序。 我今天尝试了几个,但都想包含 标签,或引用样式表。 我正在寻找一种非常适合代码段并且包含内联样式的工具。 有什么建议么?
I'm looking for a syntax highlighter cum code formatter for my blog on BlogSpot. I've tried several today, but the all want to include <style>
tags, or reference a stylesheet. I'm looking for one that is ideal for segments of code, and includes styling inline. Any suggestions?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
上面引用的项目已移动:
http://alexgorbatchev.com/wiki/SyntaxHighlighter
在 Blogger 上使用它的说明:
mlawire.blogspot.com/2009/07/blogger-syntax-highlighting.html
The project referenced above has moved:
http://alexgorbatchev.com/wiki/SyntaxHighlighter
Instructions for using it on Blogger:
mlawire.blogspot.com/2009/07/blogger-syntax-highlighting.html
您始终可以将 Pygments 荧光笔(这确实非常出色)的额外几个字节的样式复制到您博客的
。 您甚至不需要安装任何软件; 只需从在线服务复制 HTML 即可。
You can always copy the extra few bytes of styling for, say, a Pygments highlighter (which really is quite excellent) into the
<head>
of your blog. You don't even need to install any software; just copy the HTML from the online service.我创建了一个免费在线 C# 语法荧光笔,它具有以下功能:你需要 - 内联所需的 CSS 样式。 您所要做的就是选中“内联样式”复选框,粘贴 C# 代码并单击着色按钮。 您可以在我的博客上找到它。
I've created a Free Online C# Syntax Highlighter that has exactly the ability you need - to inline the needed CSS styles. All you have to do is to select the "Inlined styles" check box, paste your C# code and click the Colorize button. You can find it on my blog.
试试这个:http://code.google.com/p/syntaxhighlighter/
Try this one: http://code.google.com/p/syntaxhighlighter/
我使用 SyntaxHighlighter Javascript 库。 添加和使用非常简单。
以下是可能对其他人有帮助的更多信息:
http ://www.craftyfella.com/2010/01/syntax-highlighting-with-blogger-engine.html
I use SyntaxHighlighter Javascript Library. It's really easy to add and use.
here's more information on it that might help others out:
http://www.craftyfella.com/2010/01/syntax-highlighting-with-blogger-engine.html
我遇到了这个问题。
我为 Pygments (包含在核心发行版中)编写了一个图像格式化程序。
请不要因为我的这种令人厌恶的行为而恨我,但是,是的,它会将突出显示的代码呈现为 png 或 jpg 或任何你想要的格式。 因此它没有外部依赖项等。
我尝试确保始终链接源的纯文本版本以供人们复制粘贴。
I had this exact problem.
I wrote an image formatter for Pygments (included in the core distribution).
Please don't hate me for such an abomination, but yes, it renders the highlighted code as a png or jpg or whatever you want. So it has no external dependencies etc.
I try to make sure that I always link a plain text version of the source for people copy-pasting.