Coderay 可以重新缩进 C(或类 C)代码吗?

发布于 2024-11-30 01:01:06 字数 115 浏览 8 评论 0原文

我有一个网站接受新手编码人员的输入,并希望重新缩进代码以使其格式“正确”。我很乐意在显示时重新缩进代码,因此它可能是一个 ruby​​ 解决方案,但也可能对 JS 解决方案感兴趣,如果它可以在保存之前向用户显示结果。

I've got a site that accepts input from newbie coders, and would like to re-indent code so that it is "properly" formatted. I'd be happy with re-indenting the code as it's displayed, so it could be a ruby solution, but might also be interested in a JS solution if it could show the user the results before saving.

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

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

发布评论

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

评论(1

瑾兮 2024-12-07 01:01:06

不可以。CodeRay 仅用于语法突出显示。它不包括适当的解析器。

No. CodeRay is only for syntax highlighting. It doesn't include a proper parser.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文