Fix more silly bugs
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Wed, 13 Apr 2011 08:46:27 -0600
changeset 62 e6d9b757544c
parent 61 7dee1a3d81fd
child 63 a0154fcf0f57
Fix more silly bugs
autoimplementation.html
--- a/autoimplementation.html	Wed Apr 13 08:29:31 2011 -0600
+++ b/autoimplementation.html	Wed Apr 13 08:46:27 2011 -0600
@@ -49,6 +49,7 @@
 
 <script src=implementation.js></script>
 <script>
+"use strict";
 var tests = {
 	backcolor: [
 		'<p>foo[bar]baz',
@@ -1111,7 +1112,7 @@
 	}
 
 	cell.innerHTML = "<div></div><div></div>";
-	node = cell.firstChild;
+	var node = cell.firstChild;
 	node.innerHTML = test;
 
 	var startNode, startOffset, endNode, endOffset;
@@ -1169,7 +1170,7 @@
 		var elStartIdx = data.indexOf("{");
 
 		data = cur.data.replace(/\{/g, "");
-		var elEndIdx = cur.data.indexOf("}");
+		var elEndIdx = data.indexOf("}");
 
 		if (elStartIdx == 0) {
 			startNode = cur.parentNode;