Skip to content

Latest commit

 

History

History
68 lines (47 loc) · 1.4 KB

README.md

File metadata and controls

68 lines (47 loc) · 1.4 KB

Coverage

CSharpDiff

C# Diff with Unified Diff Support, this codebase is a port from the popular JS library jsdiff by kpdecker.

Warning

The only functionality implemented at this time is the unified diff. Everything is guaranteed to be a bit buggy.

Usage Example

Diff

Sentence

using CSharpDiff.Diff;

var text1 = "Here im. Rock you like old man.";
var text2 = "Here im. Rock you like hurricane.";

var diff = new DiffSentence();
var difference = diff.diff(text1, text2);

Patch

Create

using CSharpDiff.Patch;

var text1 = "...";
var text2 = "...";

var ps = new Patch();
string patch = ps.create("filename1", "filename2", text1, text2, "header1", "header2", new PatchServiceOptions());

Works Well With

Todo

  • Clean-up code (Code smells and bugs according to Sonar)
  • Patch
    • Create
    • Apply
    • Merge
    • Parse
  • Diff
    • Array (difficult, JS allows type mixing)
    • Base
    • Character
    • CSS
    • JSON
    • Line
    • Sentence
    • Word
  • Convert
    • XML
    • DMP

Contributing

Idk, just make a pull request.