[Pkg-mozext-commits] [sage-extension] 05/49: reverted getInnerText function
David Prévot
taffit at moszumanska.debian.org
Fri May 1 03:10:52 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to tag sage_1_3_10
in repository sage-extension.
commit 70a6285f934046c4e2f297ec4bee0a4434f0dfe1
Author: Peter Andrews <petea at jhu.edu>
Date: Mon May 9 01:41:11 2005 +0000
reverted getInnerText function
---
src/sage/content/commonfunc.js | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/src/sage/content/commonfunc.js b/src/sage/content/commonfunc.js
index 60e3084..488c761 100755
--- a/src/sage/content/commonfunc.js
+++ b/src/sage/content/commonfunc.js
@@ -202,7 +202,14 @@ var CommonFunc = {
getInnerText: function(aNode) {
- return aNode.textContent.replace(/^\s+|\s+$/g, "");
+ if(!aNode.hasChildNodes()) return "";
+
+ var resultArray = new Array();
+ var walker = aNode.ownerDocument.createTreeWalker(aNode, NodeFilter.SHOW_CDATA_SECTION | NodeFilter.SHOW_TEXT, null, false);
+ while(walker.nextNode()) {
+ resultArray.push(walker.currentNode.nodeValue);
+ }
+ return resultArray.join('').replace(/^\s+|\s+$/g, "");
},
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/sage-extension.git
More information about the Pkg-mozext-commits
mailing list