Coder Social home page Coder Social logo

difflib's Introduction

Hey!

You can call me Jono. My pronous are "he / him / his". I generally contribute to projects where I'm experiencing papercuts, it's a great way to experience a wide range of different approaches to creating great software. I'm always excited to be wrong, and overjoyed to delete my own code.

I work for a really great company called Capital Markets Gateway, who are just a great bunch of peers and leaders. I'm the jack of all trades at the virtual office, but I'm mostly focusing on streamlining our CI right now. At work you'll find me using C#, JS, and a little Rust.

I'm currently working on these:

Have an awesome day!

difflib's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

difflib's Issues

Licence grant

Hi I was wondering if I could have a licence grant to include your differ in my JsonDiffPatch library? I'd like to use it to diff arrays, and I may modify it..

My project is MIT licenced and not having some of the code under a difference licence would be a big help.

Missing diff instruction at beginning of sequences

Unless I'm using your library incorrectly It looks like the Differencer.FindDifferences method is not reporting inserts at the beginning of a sequence. Most likely it's not reporting removes either but I didn't test for that.

Using the following code:

List<string> olderList = new List<string>(new string[] {
    "public  class MyException extends Exception {",
    "",
    "}"
});
List<string> newerList = new List<string>(new string[] {
    "/**",
    " * Simple exception.",
    " */",
    "public  class MyException extends Exception {",
    "",
    "}"
});
DiffLib.PatienceSequenceMatcher<string> matcher = new DiffLib.PatienceSequenceMatcher<string>();
DiffLib.Differencer<string> differencer = new DiffLib.Differencer<string>(matcher);
IEnumerable<DiffLib.DifferenceInstruction> diffs = differencer.FindDifferences(
    olderList, 
    newerList);

I'm expecting the diffs collection to have the following results:
{+ (0, 0 -> 2)}
{= (0 -> 2, 3 -> 5)}

However the actual results are:
{= (0 -> 2, 3 -> 5)}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.