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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Show HN: Fancy-ANSI – Small JavaScript library for converting ANSI to HTML

16 点作者 andres大约 1 年前
I made this tool to add support for custom ANSI palettes to kubetail (<a href="https:&#x2F;&#x2F;github.com&#x2F;kubetail-org&#x2F;kubetail">https:&#x2F;&#x2F;github.com&#x2F;kubetail-org&#x2F;kubetail</a>). Maybe you&#x27;ll find it useful too.<p>Let me know if you have any suggestions!

4 条评论

giraffe_lady大约 1 年前
Ah this is awesome. I&#x27;ve been working on a browser based mud client and none of the existing options handled everything I needed. I&#x27;ll be switching to this immediately, it seems to solve all of my current problems with displaying ansi text in the browser.
评论 #39945728 未加载
epage大约 1 年前
Recently did something similar in Rust but for generating SVGs. We&#x27;ve adopted it for snapshot testing of cargo and rustc&#x27;s output. Don&#x27;t have a good PR handy for showing Github&#x27;s rendering of changes in the SVG (text, side-by-side, swiping) but <a href="https:&#x2F;&#x2F;github.com&#x2F;rust-lang&#x2F;rust&#x2F;pull&#x2F;121877&#x2F;files">https:&#x2F;&#x2F;github.com&#x2F;rust-lang&#x2F;rust&#x2F;pull&#x2F;121877&#x2F;files</a> has newly added SVGs.<p>To see what is supported, see the screenshot in the docs: <a href="https:&#x2F;&#x2F;docs.rs&#x2F;anstyle-svg&#x2F;latest&#x2F;anstyle_svg&#x2F;" rel="nofollow">https:&#x2F;&#x2F;docs.rs&#x2F;anstyle-svg&#x2F;latest&#x2F;anstyle_svg&#x2F;</a>
blueflow大约 1 年前
It is unclear to what extent the ANSI control codes are implemented. The README mentions SGR and the 24-bit color extensions in the nonstandard semicolon syntax. What about cursor movements? Backspace? Overstriking?<p>Which &quot;ANSI&quot; did you use as reference?
评论 #39945643 未加载
评论 #39945562 未加载
chrismorgan大约 1 年前
Simple bug report: an empty SGR (CSI m, ) doesn’t do anything, but should be equivalent to 0, reset all.
评论 #39945656 未加载