How to get "Number of differences" from diff output
6 views
Skip to first unread message
Huzaifa S
unread,
Feb 21, 2016, 5:00:10 PM2/21/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Pretty Diff
With reference to code below, the XML Diff output is saved into variable "pz", This content has a line that says "Number of differences: 2320 differences from 630 lines of code." Can I get this info by looking up some internal property on the object pd? OR do I have to parse the output?
var options = { api:"" source: srcXML, diff: diffXML, mode: "diff", // beautify, diff, minify, parse lang: "auto" }; var pd = prettydiff(options); var pz = pd[0];
in...@prettydiff.com
unread,
Feb 22, 2016, 2:17:13 PM2/22/16
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to prett...@googlegroups.com
Huzaifa,
Looking at the provided sample code you are assigning the result of a
prettydiff function to a variable "pd". The data you seek is in pd[1]
(the second and final index of the array).
I am not currently generating the diff counts as a stand alone data facet,
but I probably should.