I would like to get the differences (string deleted and string added) between two HTML Strings. The function of the diff function has to give result as follows:
String html1 = "
foo foo
";String html2 = "
foo baar
";private String diff(String html1, String html2){
...
// diff method should return following:
return "
foo foo baar
";}
I tried diff_match_patch but it has Problem with html tags. Example:
String html1 = "
- foo
- baar
String html2 = "
- AA
diff_match_patch(html1, html2) gives the following diff string:
- AA
- BB
it should be:
- AA
BB