go.talks: compile all code in editable code snippets

Some elements of the DOM were being skipped over
because the existing algorithm assumed all the code
was inside SPAN tags. The browser "contenteditable"
feature introduces DIVs and probably other things.
The new algorithm is more liberal in what it accepts.

R=r, dsymonds
CC=golang-dev
https://golang.org/cl/14169043
diff --git a/present/js/play.js b/present/js/play.js
index 3b8c340..048ff2f 100644
--- a/present/js/play.js
+++ b/present/js/play.js
@@ -9,14 +9,15 @@
 		var s = "";
 		for (var i = 0; i < node.childNodes.length; i++) {
 			var n = node.childNodes[i];
-			if (n.nodeType === 1 && n.tagName === "SPAN" && n.className != "number") {
-				var innerText = n.innerText === undefined ? "textContent" : "innerText";
-				s += n[innerText] + "\n";
+			if (n.nodeType !== 1) continue;
+			if (n.tagName === "BUTTON") continue;
+			if (n.tagName === "SPAN" && n.className === "number") continue;
+			if (n.tagName === "PRE"){
+				s += text(n);
 				continue;
 			}
-			if (n.nodeType === 1 && n.tagName !== "BUTTON") {
-				s += text(n);
-			}
+			var innerText = n.innerText === undefined ? "textContent" : "innerText";
+			s += n[innerText] + "\n";
 		}
 		return s;
 	}