Ruby 中最好的 Diff 库是什么? [英] What is the best Diff library in 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 gem 用于区分文本或 html 文件?
Are there any good, actively maintained ruby gems for diffing text or html files?
推荐答案
我环顾四周,找不到提供从 ruby 生成差异样式输出的便捷方法的现有 gem 或库.
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 差异,而无需大惊小怪.我希望其他人觉得它有用.它在 wiff.me 上用于任何想要预览 html 输出的人.
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 中最好的 Diff 库是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!