什么是Ruby中最好的差异库? [英] What is the best Diff library in Ruby?

查看:93
本文介绍了什么是Ruby中最好的差异库?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我看过diff-lcs( http://raa.ruby-lang .org / project / diff-lcs ),但它没有很好的文档记录,似乎没有维护。

I've looked at diff-lcs ( http://raa.ruby-lang.org/project/diff-lcs ) but it's poorly documented, and appears to be unmaintained.

是否有任何良好的,积极维护的ruby宝石用于比较文本或html文件?

Are there any good, actively maintained ruby gems for diffing text or html files?

推荐答案

我环顾四周,无法找到现成的宝石或库,从红宝石diff样式输出。

I looked around and couldn't find an existing gem or library that offered a convenient way to generate diff style output from ruby.

我刚刚发布了 diffy 想。这是一个围绕 diff 的轻量级包装,它允许您从两个字符串中生成文本或html差异,而不用大惊小怪。我希望别人觉得它有用。任何想要预览html输出的人都可以在 wiff.me 上使用。

I just released diffy which does what I want. It's a lightweight wrapper around diff which lets you generate text or html diffs from two strings, without a lot of fuss. I hope others find it useful. It's in use on wiff.me for anyone wants to preview the html output.

这篇关于什么是Ruby中最好的差异库?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆