package simple-diff
Simple_diff is a pure OCaml diffing algorithm.
Install
Dune Dependency
Authors
Maintainers
Sources
v0.2.1.tar.gz
sha256=316bc2619087e5989c0e2c7d93a223d4328f4696185d81ef8be6dffd578b0bfb
md5=3694fd83a00203bfb0ce861310643217
Description
This diffing algorithm is a port of https://github.com/paulgb/simplediff with some minor differences in the implementation.
Published: 08 Feb 2017
README
Simple Diff
Description
Simple Diff is a pure OCaml implementation of a diffing algorithm ported from https://github.com/paulgb/simplediff.
Usage
opam install simple-diff
It exposes only one function, get_diff
, which expects two arrays of strings. These arrays of strings typically represent lines of a new and old versions of a file. The return value is a list of diff
s. Below is an example of how to use:
open Simple_diff;;
let old = [| "foo"; "bar"; "baz"; "bin" |];;
let new = [| "bar"; "baz"; "foo"; "bin" |];;
get_diff old new;;
#=> [
Deleted [| "foo"; "bar"; "baz" |];
Added [| "bar"; "baz"; "foo" |];
Equal [| "bin" |]
]
Dependencies (5)
-
re
>= "1.7.1"
-
ocamlbuild
build
-
ocamlfind
build
-
topkg
build
-
ocaml
>= "4.00.0"
Dev Dependencies
None
Used by
None
Conflicts
None
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page