crystal-diff
crystal-diff
Crystal sequence differencing implementation.
Based on the algorithm proposed in "An O(NP) Sequence Comparision Algorithm" (Wu, 1989)
Installation
Add this to your application's shard.yml
:
dependencies:
diff:
github: MakeNowJust/crystal-diff
Usage
require "colorize"
require "../src/diff"
Diff.diff("hello world", "hello good-bye").each do |chunk|
print chunk.data.colorize(
chunk.append? ? :green : chunk.delete? ? :red : :dark_gray)
end
puts
Development
$ crystal spec
Contributing
- Fork it ( https://github.com/MakeNowJust/crystal-diff/fork )
- Create your feature branch (git checkout -b my-new-feature)
- Commit your changes (git commit -am 'Add some feature')
- Push to the branch (git push origin my-new-feature)
- Create a new Pull Request
Contributors
- MakeNowJust TSUYUSATO Kitsune - creator, maintainer
Repository
crystal-diff
Owner
Statistic
- 39
- 6
- 2
- 4
- 0
- almost 4 years ago
- January 22, 2016
License
MIT License
Links
Synced at
Thu, 21 Nov 2024 17:56:07 GMT
Languages