镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content
zotonicPublic
forked from mmzeeman/diffy

About

Erlang diff match and patch implementation

Resources

Stars

11 stars

Watchers

2 watching

Forks

 
 

Latest commit

 

History

62 Commits

Folders and files

Repository files navigation

Diffy

Test

Diff, Match and Patch implementation for Erlang.

Introduction

Diffy is an erlang implementation of the Diff Match and Patch library for plain text. The implementation uses binaries throughout and is utf-8 aware.

Example

1> diffy:diff(<<"fruit flies like a banana">>, <<"fruit flies eat a banana">>)
[{equal,<<"fruit flies ">>},
 {delete,<<"like">>},
 {insert,<<"eat">>},
 {equal,<<" a banana">>}]

TODO

  • cleanup_semantic(diffs()) -> diffs()
  • make_patch(Text1, Text2) -> patches(), make_patch(unicode_binary(), diffs()) -> patches(), make_patch(Diffs) -> patches()
  • match(Text, Pattern, Loc)

References

Much good info about diff, match and patch can found at link: http://neil.fraser.name/writing/diff/

About

Erlang diff match and patch implementation

Resources

Stars

11 stars

Watchers

2 watching

Forks

Releases

Packages

Used by

Contributors

Languages