Coderay 可以重新缩进 C(或类 C)代码吗?
我有一个网站接受新手编码人员的输入,并希望重新缩进代码以使其格式“正确”。我很乐意在显示时重新缩进代码,因此它可能是一个 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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
不可以。CodeRay 仅用于语法突出显示。它不包括适当的解析器。
No. CodeRay is only for syntax highlighting. It doesn't include a proper parser.