Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 

cfwheels-diffmatchpatch

CFWheels plugin that uses the Diff Match and Patch libraries from Google, that offer robust algorithms to perform the operations required for synchronizing plain text.

The source for the current .jar file is from: http://google-diff-match-patch.googlecode.com/svn/trunk/maven/diff_match_patch/diff_match_patch/current/ which is hosted at https://code.google.com/p/google-diff-match-patch/

Example

<cfscript>
var loc = {};
loc.diffs = diff_main(stringBefore="a", stringAfter="ab"); //Getting Differences
writeOutput(diff_prettyHtml(loc.diffs)); //Showing the differences in HTML

loc.diffs2 = diff_main(stringBefore="ab", stringAfter="aabb"); //Getting Differences
diff_cleanupSemantic(loc.diffs2); //Cleaning up and make the differences readable for humans
writeOutput(diff_prettyHtml(loc.diffs2)); //Showing the differences in HTML
</cfscript>

About

A port of googles diff-match-patch library for cold fusion

Resources

License

Releases

No releases published

Packages

No packages published