Skip to content

Commit 10aa13e

Browse files
committed
Small cleanups for d232e50
1 parent d232e50 commit 10aa13e

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

test/html-hint-test.js

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,14 @@
3030
}
3131
];
3232

33-
3433
function escapeHtmlList(o) {
3534
return '<code>' +
3635
JSON.stringify(o.list,null,2)
3736
.replace(/</g, "&lt;")
3837
.replace(/>/g, "&gt;") +
3938
'</code>'
40-
;
4139
}
4240

43-
4441
function test(name, spec) {
4542
testCM(name, function(cm) {
4643
cm.setValue(spec.value);
@@ -65,16 +62,15 @@
6562
value.from = value.from || Pos(lines.length-1,0);
6663
value.cursor = value.cursor || value.to;
6764
var name = value.name ||value.value;
68-
test(name,value) });
69-
70-
65+
test(name,value)
66+
});
7167

7268
function deepCompare(a, b) {
7369
if (a === b) return true;
7470
if (!(a && typeof a === "object") ||
7571
!(b && typeof b === "object")) return false;
76-
var array = Array.isArray(a);
77-
if (Array.isArray(b) !== array) return false;
72+
var array = a instanceof Array
73+
if ((b instanceof Array) !== array) return false;
7874
if (array) {
7975
if (a.length !== b.length) return false;
8076
for (var i = 0; i < a.length; i++) if (!deepCompare(a[i], b[i])) return false

0 commit comments

Comments
 (0)