Ignore selection for sameness checking
authorAryeh Gregor <AryehGregor+gitcommit@gmail.com>
Wed, 06 Apr 2011 13:04:09 -0600
changeset 41 6817d05648cb
parent 40 7cbe5f9daa66
child 42 4c25f79c7ddc
Ignore selection for sameness checking
autoimplementation.html
--- a/autoimplementation.html	Wed Apr 06 12:55:52 2011 -0600
+++ b/autoimplementation.html	Wed Apr 06 13:04:09 2011 -0600
@@ -696,13 +696,16 @@
 	var sameCell = document.createElement("td");
 	var exception = false;
 	try {
-		// Ad hoc normalization to avoid basically spurious mismatches
+		// Ad hoc normalization to avoid basically spurious mismatches.  For
+		// now this includes ignoring where the selection goes.
 		var normalizedSpecCell = tr.childNodes[1].childNodes[1].textContent
+			.replace(/[[\]{}]/g, "")
 			.replace(/;? ?"/g, '"')
 			.replace(/<(\/?)strong/g, '<$1b')
 			.replace(/<(\/?)em/g, '<$1i')
 			.replace(/#[0-9a-fA-F]{6}/g, function(match) { return match.toUpperCase(); });
 		var normalizedBrowserCell = tr.childNodes[2].childNodes[1].textContent
+			.replace(/[[\]{}]/g, "")
 			.replace(/;? ?"/g, '"')
 			.replace(/<(\/?)strong/g, '<$1b')
 			.replace(/<(\/?)em/g, '<$1i')