TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Show HN: HTMLify - Turn code snippets into HTML, for tech bloggers

27 点作者 Nurdok大约 12 年前

8 条评论

arb99将近 12 年前
Was expecting full html markup with colours etc like in most IDEs. maybe add that as a optional feature? <a href="http://qbnz.com/highlighter/" rel="nofollow">http://qbnz.com/highlighter/</a> or similar library might help there.<p>This seems like a slightly extended htmlentities(nl2br($input)) (if done in php). handy in those times you need stuff converted so it'll output the same way as what you are pasting in.
评论 #5728628 未加载
oakaz将近 12 年前
no colors?<p>I would just prefer to wrap my code with &#60;pre&#62;&#60;/pre&#62; instead of using a whitespace generator which makes pain in the ass to make modifications on the code.
评论 #5728922 未加载
kranner大约 12 年前
Great, but I'd like to see a preview of the output on that page.
评论 #5728466 未加载
kruhft将近 12 年前
Export your font-locked (colored) emacs buffer to html:<p><a href="http://www.emacswiki.org/emacs/Htmlize" rel="nofollow">http://www.emacswiki.org/emacs/Htmlize</a><p>or<p><a href="http://www.emacswiki.org/emacs/HtmlFontify" rel="nofollow">http://www.emacswiki.org/emacs/HtmlFontify</a>
评论 #5729033 未加载
franzwong将近 12 年前
I would recommend you to write a javascript version to render on the fly. So that you can keep your code being saved without any modification.
Perrydu将近 12 年前
If you write blog posts in markdown, it's useless.
评论 #5728641 未加载
评论 #5728600 未加载
评论 #5728916 未加载
borplk将近 12 年前
Does it just wrap your code in pre and code tags or am I missing something?
评论 #5728664 未加载
tuananh将近 12 年前
this can be done easily with a script as it simply wrap the tex with a pre tag. i don't see the need for this kind of thing. tech bloggers usually got enough knowledge for this kind of stuff.
评论 #5729276 未加载