Rails ERB 模板的空白去除器?
在谷歌搜索没有成功后,我在这里尝试一下。我正在寻找一个rails gem,它可以从渲染的ERB模板中删除空格,因此代码结构等被删除,只是压缩的html代码。这里有什么提示吗?
提前致谢
after googling around with no success i try it here. i'm looking for a rails gem, which removes whitespace from rendered ERB templates, so code structure etc. gets removed, just compressed html code. any tip here?
thanks in advance
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可能对此感兴趣,这是一个 Rack 中间件,它通过自动缩进和重新格式化内容来清理文本/html 标记:
http://coderack.org/users/webficient/middlewares/38-racktidy
You might be interested in this, a Rack middleware which cleans text/html markup by automatically indenting and reformatting content:
http://coderack.org/users/webficient/middlewares/38-racktidy