Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
  • May 03 12:37

    prettydiff on master

    Update readme.md (compare)

  • Mar 25 13:43

    prettydiff on master

    Update readme.md A timeline co… (compare)

  • Mar 25 13:41

    prettydiff on master

    Update readme.md Updated perso… (compare)

  • Mar 08 17:24

    prettydiff on master

    Update readme.md (compare)

  • Mar 08 17:23

    prettydiff on master

    Update readme.md (compare)

  • Jan 18 14:17

    prettydiff on master

    Update readme.md (compare)

  • Jan 18 13:41
    prettydiff commented #634
  • Jan 10 02:51
    panoply commented #634
  • Jan 10 02:19
    panoply closed #618
  • Jan 02 20:32
    mblode closed #623
  • Nov 28 2021 17:15
    MartinDelille opened #642
  • Oct 29 2021 14:59
    BellemareMederic commented #620
  • Jul 22 2021 03:02
    intwebg commented #531
  • Jul 22 2021 02:57
    intwebg commented #531
  • Jul 22 2021 02:50
    intwebg commented #531
  • May 23 2021 14:34
    panoply commented #634
  • May 19 2021 18:28
    prettydiff commented #634
  • May 19 2021 18:25
    prettydiff commented #634
  • May 13 2021 00:12
    panoply commented #634
  • Apr 19 2021 01:21

    prettydiff on master

    Update readme.md (compare)

ly
@lyapharov
For example i have 2 htmls: html1 - <b>test</b>, html2 - <i>test</i> . I need to mark <b>test</b> as deleted.
Austin Cheney
@prettydiff
Select the option "Inline view"
Austin Cheney
@prettydiff
Pretty Diff recently climbed over 1,000,000 NPM downloads.
Austin Cheney
@prettydiff
Investigating adding support for TypeScript
Lucas Ma
@peterma
Hi, guys. Is there any way to make PrettyDiff support IE8?
aleksandrkl
@aleksandrkl
Hi, I am trying to understand if prettydiff can be used as a general purpose text comparison tool. The main thing I need is to find similar fragments between two or more text files. Can you clarify how prettydiff works and if this is something that can be achieved with it.
Austin Cheney
@prettydiff
@peterma Pretty Diff does not claim to support IE8. I have intentionally dropped support for IE8 in my api/dom.js file which is the file that powers the supplied HTML interface. I don't remember if the core application contains anything that breaks IE8 support.
@aleksandrkl Pretty Diff can be used as a text comparison tool. Just select "Plain Text" from the language option or use this link: http://prettydiff.com/?m=diff&l=text
Patrick Kelley
@scriptsrc
I've noticed sometimes prettydiff removes newlines from array elements, so it ends up scrolling horizontally quite a bit. Other times this doesn't seem to happen, even within the same JSON document. Is there something I can do to always force a \n so the next array element is on its own line?
hsultanali
@hsultanali
When comparing to XML documents using the web front end, everything works. But when I do it using code I am not getting the same out put...here is my code
var options = {
source: srcXML,
diff: diffXML,
mode: "diff",
diffview: "inline"
};
var pd = prettydiff(options); // returns and array: [beautified, report]
var pretty = pd[0];  // the result is not inline and the # of line difference do not match what the UI returns
Austin Cheney
@prettydiff
@monkeysecurity Try the neverflatten option: http://prettydiff.com/documentation.xhtml#neverflatten If that doesn't work please open an issue on Github with a code sample so that I can reproduce the problem and get you a resolution. https://github.com/prettydiff/prettydiff/issues
@hsultanali Are you attempting to use Pretty Diff in a client side app inside a browser or from the command line?
hsultanali
@hsultanali
I am running it in an ERP system that uses the Rhino implementation of JavaScript to run scripts.
Austin Cheney
@prettydiff
This clearly sounds like a defect, but I will need to reproduce the problem to ensure I am providing a valid solution. Would you be able to provide any guidance on how I can reproduce? I will be investigating in various environments in the mean time.
hsultanali
@hsultanali
Because the XML diff comparison is working properly via the Web tool. So far, I've tried to take the default options set by the web tool and see if that makes a difference...I will try adding the flatten option and open an issue if that does not work..
thank you for your help
Austin Cheney
@prettydiff
@hsultanali The flatten option won't help with this. It was just for @monkeysecurity's issue.
Austin Cheney
@prettydiff
I am seeing your emails in mailing list, of which the last is very detailed. I will attempt to reproduce the defect based upon your instructions and will let you know.
hsultanali
@hsultanali
ok thx..I also sent an email to nfo@prettydiff.com with some screenshots..hope that helps..I will not open an issue on github for now...
Will await hearing back from you..I hope its as easy fix...
Austin Cheney
@prettydiff
I sent you an email. In my tests changing the "api" option to any value other than "dom" produced a complete XML document with all included CSS and script code.
bhuvangu
@bhuvangu

When running the following command i get the diff as html , but the right side of diff is b.javainstead of content of b.java

prettydiff source:"a.java" readmethod:"auto" diff:"b.java" lang:"text" readmethod:"auto" mode:"diff" diffcli="false" > out.html

What am i doing wrong?

Also when i change the readmethod to file the output is always text not html

Version: 1.16.17 Dated: 16 February 2016
node v0.10.36
npm -v 1.3.6

Link to loged issue: prettydiff/prettydiff#271

Austin Cheney
@prettydiff
A pre-release of version 2 is available online at http://prettydiff.com/ignore/testlocation
I will create a branch for this on github shortly
Austin Cheney
@prettydiff
You can also play around with it on the command line by cloning the Github repo and checking out branch "v2.0.0"
VWTypeIII
@VWTypeIII
I am trying to invoke prettydiff via HTML. How do I compose the URL to specify the source and dest files? Here is what I have tried: http://localhost/prettydiff-master/index.xhtml?right=file:///D:/Archive/010/project/2.0/TEST.INT&left=file:///D:/Archive/010/project/2.1/TEST.INT&ace=false
Austin Cheney
@prettydiff
The URI parameters won't work on the localhost. They use AJAX to fetch the files. To work with local files you will have to either manually copy the file contents into the web tool or just use the node client.
Justin Murray
@murrayju
@prettydiff I'm having a hard time getting the latest version to load in a browser via requirejs... it seems like there is a circular dependency where markuppretty depends on jspretty, and jspretty depends on markuppretty
Austin Cheney
@prettydiff
That is correct, they are co-dependent. I will open an issue on this as the error is likely valid. @murrayju would you be able to supply a slimmed down HTML/JS of your use case to help me reproduce this faster?
@murrayju prettydiff/prettydiff#435
Justin Murray
@murrayju
@prettydiff here is the simplest example of the problem that I could make https://github.com/murrayju/prettydiff-test
Just clone, npm install, and open the index.html in a browser
Austin Cheney
@prettydiff
Thanks for that. It is realistic that support for require.js was never 100%. I have already started working on this and am dedicated to resolving it because ES6 modules will also be completely asynchronous.
Justin Murray
@murrayju
no problem. Also, if you are interested in seeing the real use case, take a look at https://github.com/murrayju/xslt
I'm using prettydiff in my automated tests to validate that xml transforms are working as expected (across browsers)
I just committed my hacky-workaround code there today
Austin Cheney
@prettydiff
Thank you so much for working with me on this. Its a huge help. I got it working on my local, but I need to do some clean up and refinement to ensure I am not causing regression and that the solution is durable.
Justin Murray
@murrayju
@prettydiff just gave the stuff in the 2.2.0 branch a try... There is some improvement, but there is still a race condition where I sometimes get errors. It seems like the modules have to be loaded in a particular order, but that dependence isn't explicit. Doing what your example has loads them all async, so sometimes the order is correct and it works, and other times it isn't and I get exception like TypeError: global.prettydiff.diffview is not a function in bower_components/prettydiff/prettydiff.js (line 289)
Austin Cheney
@prettydiff
I will spend more time looking at this right now, and see if I can nail this down.
Austin Cheney
@prettydiff
Would you mind putting up your latest code attempt? I am not able to reproduce.
Justin Murray
@murrayju
@prettydiff sorry, this thing didn't notify me at all, and I'm just coming back to this now. Take a look at https://github.com/murrayju/prettydiff-test, that is how I would expect a requirejs compatible library to be used, and it does not work. Your https://github.com/prettydiff/prettydiff/blob/master/test/barebones/barebones_requirejs.js example isn't really valid, because it depends on that global variable and the synchronous execution of just using a single require. RequireJS is meant to be used async (AMD), and defineing a module that depends on prettydiff should just work (but doesn't). Also, there should really just be a single dependency for consumers to use, not a whole bunch of internal files.
Austin Cheney
@prettydiff
I look more into this over the weekend
nithinev
@nithinev
How to integrate pretty diff library with angular js? any body have some idea
since in angularjs we are loading the external js files then then we load our view template . pretty diff is not working properly.
Justin Murray
@murrayju
@nithinev take a look at prettydiff/prettydiff#458, you probably have the same issues that I do
You might be able to work around it, but it can be very painful, depending on how you manage modules.
Austin Cheney
@prettydiff
Thanks nithinev... I clearly have some work to do on architecture.
bjornmuh [LTC]
@bjornmuh_twitter
I am trying to use prettydiff on two xml config files. But it never stops.. it keeps running seemingly doing the same stuff over and over forever.. This is my example command line: [ prettydiff source:"c:\source\Web.config" diff:"c:\target\Web.config" lang:"markup" report:true endquietly:"quiet" ] does it have any obvious mistakes?
王霄池(wangxiaochi)
@picasso250
do you have some thing to diff csv files?