Copyright © 2014-2019 Maas-Maarten Zeeman
Authors: Maas-Maarten Zeeman (mmzeeman@xs4all.nl).
Diffy, an erlang diff match and patch implementation
Copyright 2014-2019 Maas-Maarten Zeeman
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Erlang diff-match-patch implementationdiff() = {diff_op(), unicode:unicode_binary()}
diff_op() = delete | equal | insert
diffs() = [diff()]
cleanup_efficiency/1 | Do efficiency cleanup of diffs. |
cleanup_efficiency/2 | |
cleanup_merge/1 | |
cleanup_semantic/1 | Do semantic cleanup of diffs. |
destination_text/1 | Compute the destination text from a list of diffs. |
diff/2 | Compute the difference between two binary texts. |
diff_bisect/2 | |
diff_linemode/2 | |
levenshtein/1 | Compute the Levenshtein distance, the number of inserted, deleted or substituted characters. |
make_patch/1 | create a patch from a list of diffs. |
make_patch/2 | create a patch from the source and destination texts. |
pretty_html/1 | Convert the diffs into a pretty html report. |
source_text/1 | Compute the source text from a list of diffs. |
split_pre_and_suffix/2 | |
text_size/1 | Count the number of characters in a utf8 binary. |
unique_match/2 | Returns true iff Pattern is a unique match inside Text. |
Do efficiency cleanup of diffs.
cleanup_efficiency(Diffs, EditCost) -> any()
Do semantic cleanup of diffs
destination_text(Diffs) -> any()
Compute the destination text from a list of diffs.
diff(Text1::unicode:unicode_binary(), Text2::unicode:unicode_binary()) -> diffs()
Compute the difference between two binary texts
diff_bisect(A, B) -> any()
diff_linemode(Text1, Text2) -> any()
levenshtein(Diffs) -> any()
Compute the Levenshtein distance, the number of inserted, deleted or substituted characters.
make_patch(Diffs) -> any()
create a patch from a list of diffs
make_patch(SourceText, DestinationText) -> any()
create a patch from the source and destination texts
pretty_html(Diffs::diffs()) -> iolist()
Convert the diffs into a pretty html report
source_text(Diffs) -> any()
Compute the source text from a list of diffs.
split_pre_and_suffix(Text1, Text2) -> any()
text_size(Text) -> any()
Count the number of characters in a utf8 binary.
unique_match(Pattern, Text) -> any()
Returns true iff Pattern is a unique match inside Text.
Generated by EDoc