jQuery.PrettyTextDiff icon indicating copy to clipboard operation
jQuery.PrettyTextDiff copied to clipboard

Avoid using diff container

Open parallels999 opened this issue 1 year ago • 3 comments

$("input[type=button1]").click(function () {
    $("#wrapper tr").prettyTextDiff({
        cleanup: $("#cleanup").is(":checked"),
        diffContainer: false, //setting false or null
        debug:true,
    });
});

Example: https://jsfiddle.net/rym8c2f0/ image

parallels999 avatar Oct 01 '24 22:10 parallels999

Hi @parallels999 - thanks for the change. Couple of requests:

  1. What is the need, pros and cons of setting diffContainer: false? I no longer use this library, so I am curious.

  2. Please follow the steps listed in https://github.com/arnab/jQuery.PrettyTextDiff?tab=readme-ov-file#development. Specifically, use the cake build command to produce the change in JS minified version of the code. And then increment the version in package.json (I think 1.1.0 would be apt, unless this is a backward incompatible change).

arnab avatar Oct 01 '24 22:10 arnab

What is the need, pros and cons of setting diffContainer: false?

The idea is not to have a third container with the changes, but to show old/new in the same existing containers

Specifically, use the cake build

i have no idea how to do it, I thought there would be a github action that took care of that in the releases

parallels999 avatar Oct 01 '24 22:10 parallels999

Specifically, use the cake build

i have no idea how to do it, I thought there would be a github action that took care of that in the releases

I totally understand. This library was written 12 years ago, when:

  1. there were no Github actions :)
  2. Coffeescript was cool and hip

In any case, the instructions to install cake are right in the same notes: https://github.com/arnab/jQuery.PrettyTextDiff?tab=readme-ov-file#development (it's just a npm package).

arnab avatar Oct 02 '24 17:10 arnab