FFFF Merge pull request #432 from prettydiff/2.1.18 · prettydiff/prettydiff@2d6bfd9 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2d6bfd9

Browse files
authored
Merge pull request #432 from prettydiff/2.1.18
2.1.18
2 parents 1bdeebe + ae8ef3e commit 2d6bfd9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

50 files changed

+11326
-9708
lines changed

.bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name" : "prettydiff",
3-
"version" : "2.1.17",
3+
"version" : "2.1.18",
44
"description" : "Pretty Diff can minify, beautify (pretty print), or diff code to normalize white space and comments so that only code is being compared.",
55
"keywords" : [
66
"pretty diff", "minify", "beautify", "pretty print", "white space", "whitespace", "diff", "compare", "html", "javascript", "xml", "json", "css", "less", "scss", "scope", "analysis", "node", "nodejs", "wsh"

api/dom.js

Lines changed: 99 additions & 93 deletions
Large diffs are not rendered by default.

api/node-local.js

Lines changed: 378 additions & 147 deletions
Large diffs are not rendered by default.

barebones.xhtml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
<?xml version="1.0" encoding="UTF-8" ?>
2+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3+
<html xml:lang="en" xmlns="http://www.w3.org/1999/xhtml">
4+
<head>
5+
<title>Pretty Diff - The difference tool</title>
6+
</head>
7+
<body>
8+
<h1>Pretty Diff, barebones example</h1>
9+
<p><a href="documentation.xhtml">documentation</a></p>
10+
<p>
11+
<label for="input" style="display:block">Input</label>
12+
<textarea id="input" style="height:200px;white-space:pre;min-width:400px">var a;function g(){return function y() {return q;};};</textarea>
13+
</p>
14+
<p>
15+
<label for="object" style="display:block">Options object</label>
16+
<textarea id="object" style="height:200px;white-space:pre;min-width:400px" data-prettydiff-ignore="true">{
17+
"mode": "beautify",
18+
"lang": "auto"
19+
}</textarea>
20+
</p>
21+
<p>
22+
<label for="output" style="display:block">Output</label>
23+
<textarea id="output" style="height:200px;white-space:pre;min-width:400px"></textarea>
24+
</p>
25+
<p><button type="button" id="button">Beautify Code</button></p>
26+
<script src="lib/global.js" type="application/javascript"></script>
27+
<script src="lib/language.js" type="application/javascript"></script>
28+
<script src="lib/options.js" type="application/javascript"></script>
29+
<script src="lib/finalFile.js" type="application/javascript"></script>
30+
<script src="lib/safeSort.js" type="application/javascript"></script>
31+
<script src="lib/csspretty.js" type="application/javascript"></script>
32+
<script src="lib/csvpretty.js" type="application/javascript"></script>
33+
<script src="lib/diffview.js" type="application/javascript"></script>
34+
<script src="lib/jspretty.js" type="application/javascript"></script>
35+
<script src="lib/markuppretty.js" type="application/javascript"></script>
36+
<script src="prettydiff.js" type="application/javascript"></script>
37+
<script type="application/javascript">
38+
<![CDATA[
39+
var args = JSON.parse(document.getElementById("object").value),
40+
button = document.getElementById("button");
41+
button.onclick = function () {
42+
if (typeof args.source !== "string" || args.source === "") {
43+
args.source = document.getElementById("input").value;
44+
}
45+
document.getElementById("output").value = global.prettydiff.prettydiff(args);
46+
};
47+
]]>
48+
</script>
49+
</body>
50+
</html>

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,5 +36,5 @@
3636
],
3737
"main": "./",
3838
"name": "prettydiff",
39-
"version": "2.1.17"
39+
"version": "2.1.18"
4040
}

changelog.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,20 @@
11
# Pretty Diff change log
22

3+
## v2.1.18
4+
5+
### Defects
6+
* Fixes #420, markup attributes should not be sorted if sorting is disabled in the options
7+
* Fixes #429, fixes regression against diffcli option
8+
9+
### Enhancements
10+
* Fixes #414, better preserve whitespace adjacent to span tags in HTML
11+
* Fixes #418, performance improvement for lib/markuppretty.js in V8 by ensuring level array contains only number types
12+
* Fixes #422, create a new option to explicitly supply or eliminate a new line at the end of output
13+
* Fixes #426, remove duplicate logic from lib/diffview.js
14+
* Fixes #427, two performance improvements for new diff algorithm
15+
* Fixes #428, performance improvement in all code for V8 by converting arithmetic assignment operators to assignments followed by separate explicit arithmetic
16+
* Fixes #430, created a minimal barebones HTML code sample demonstrating running Pretty Diff in a generic HTML tool
17+
318
## v2.1.17
419

520
### Defects

documentation.xhtml

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1112,6 +1112,23 @@
11121112
Function</li>
11131113
</ul>
11141114
</li>
1115+
<li id="newline">
1116+
<h4>newline</h4>
1117+
<ul>
1118+
<li>
1119+
<h5>Description</h5>
1120+
Insert an empty line at the end of output.</li>
1121+
<li>
1122+
<h5>Type</h5>
1123+
boolean</li>
1124+
<li>
1125+
<h5>Default</h5>
1126+
false</li>
1127+
<li>
1128+
<h5>As labeled in the HTML tool</h5>
1129+
Empty new line at end of output</li>
1130+
</ul>
1131+
</li>
11151132
<li id="neverflatten">
11161133
<h4>neverflatten</h4>
11171134
<ul>
@@ -1946,7 +1963,7 @@
19461963
<p>Pretty Diff is no longer published to NPM. For more information please see:
19471964
<a
19481965
href="https://github.com/prettydiff/prettydiff/issues/291"
1949-
style="display:block">https://github.com/prettydiff/prettydiff/issues/291</a>.</p>
1966+
style="display:block">https://github.com/prettydiff/prettydiff/issues/291</a></p>
19501967
</div>
19511968
<div class="segment" id="runcode">
19521969
<h3>Run the Code</h3>
@@ -2004,6 +2021,7 @@
20042021
</p>
20052022
</li>
20062023
</ul>
2024+
<p>To see an example of a bare-bones approach to running this application in custom HTML please start with <a href="barebones.xhtml">barebones.xhtml</a>, but please note this file is for demo purposes only and will not work from the prettydiff.com domain due to the site security policy. It will work on your local file system.</p>
20072025
</div>
20082026
</div>
20092027
</div>
@@ -2194,6 +2212,9 @@
21942212
<li>
21952213
<a href="guide/unrelated_codeisevil.xhtml">Code is Evil</a>
21962214
</li>
2215+
<li>
2216+
<a href="guide/unrelated_diff.xhtml">An explanation of the diff algorithm in Pretty Diff</a>
2217+
</li>
21972218
<li>
21982219
<a href="guide/unrelated_dom.xhtml">The DOM Explained, Quick and Simple</a>
21992220
</li>

guide/closure_with_jsscope.xhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
</select>
6363
</p>
6464
<p>Explore some
65-
<a href="samples.xhtml">samples</a>
65+
<a href="../samples.xhtml">samples</a>
6666
or browse
6767
<a href="https://github.com/prettydiff/prettydiff">Pretty Diff on GitHub</a>.</p>
6868
</section>

guide/codeArchitecture.xhtml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
<path
5050
d="M14871 18523 c-16 -64 -611 -2317 -946 -3588 -175 -660 -319 -1202 -320 -1204 -2 -2 -50 39 -107 91 -961 876 -2202 1358 -3498 1358 -1255 0 -2456 -451 -3409 -1279 -161 -140 -424 -408 -560 -571 -507 -607 -870 -1320 -1062 -2090 -58 -232 -386 -1479 -2309 -8759 -148 -563 -270 -1028 -270 -1033 0 -4 614 -8 1365 -8 l1364 0 10 38 c16 63 611 2316 946 3587 175 660 319 1202 320 1204 2 2 50 -39 107 -91 543 -495 1169 -862 1863 -1093 1707 -568 3581 -211 4965 946 252 210 554 524 767 796 111 143 312 445 408 613 229 406 408 854 525 1320 57 225 380 1451 2310 8759 148 563 270 1028 270 1033 0 4 -614 8 -1365 8 l-1364 0 -10 -37z m-4498 -5957 c477 -77 889 -256 1245 -542 523 -419 850 -998 954 -1689 18 -121 18 -549 0 -670 -80 -529 -279 -972 -612 -1359 -412 -480 -967 -779 -1625 -878 -121 -18 -549 -18 -670 0 -494 74 -918 255 -1283 548 -523 419 -850 998 -954 1689 -18 121 -18 549 0 670 104 691 431 1270 954 1689 365 293 828 490 1283 545 50 6 104 13 120 15 72 10 495 -3 588 -18z"/></g>
5151
</svg>
52-
<a href="prettydiff.com.xhtml">Pretty Diff</a>
52+
<a href="../index.xhtml">Pretty Diff</a>
5353
- Guide: Code Organization</h1>
5454
<p id="dcolorScheme">
5555
<label class="label" for="colorScheme">Color Scheme</label>
@@ -60,7 +60,7 @@
6060
</select>
6161
</p>
6262
<p>Explore some
63-
<a href="samples.xhtml">samples</a>
63+
<a href="../samples.xhtml">samples</a>
6464
or browse
6565
<a href="https://github.com/prettydiff/prettydiff">Pretty Diff on GitHub</a>.</p>
6666
</section>

guide/diffcli.xhtml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
</select>
6262
</p>
6363
<p>Explore some
64-
<a href="samples.xhtml">samples</a>
64+
<a href="../samples.xhtml">samples</a>
6565
or browse
6666
<a href="https://github.com/prettydiff/prettydiff">Pretty Diff on GitHub</a>.</p>
6767
</section>

0 commit comments

Comments
 (0)
0