[Pkg-mozext-commits] [firexpath] 07/18: Issue 3 The text wasn't highlighted anymore it is fixed now

David Prévot taffit at moszumanska.debian.org
Sat Mar 26 19:35:47 UTC 2016


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to tag FirePath-0.9.5
in repository firexpath.

commit cfb10dd4910b63ab9bd9f886b507503203c99698
Author: pierre.tholence <pierre.tholence at gmail.com>
Date:   Sun Aug 8 18:51:08 2010 +0000

    Issue 3 The text wasn't highlighted anymore it is fixed now
---
 content/XPathPanel.js | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/content/XPathPanel.js b/content/XPathPanel.js
index 1702a23..f73a7e9 100644
--- a/content/XPathPanel.js
+++ b/content/XPathPanel.js
@@ -771,15 +771,15 @@ Firebug.XPathPanel.TextElement = domplate(Firebug.XPathPanel.Element,
 					SPAN({"class": "nodeTag"}, "$object|getTagName"),
 					FOR("attr", "$object|attrIterator|filterFireXPathClass", Firebug.XPathPanel.Attr.tag),
 					SPAN({"class": "nodeBracket insertBefore"}, ">"),
-					SPAN({"class": "nodeText", _repObject: "$object.firstChild"}, "$object.firstChild.nodeValue|unescapeWhitespace"),
+					SPAN({"class": "nodeText", _repObject: "$object.firstChild"}, "$object.firstChild.nodeValue|escapeWhitespace"),
 					"</",
 					SPAN({"class": "nodeTag"}, "$object|getTagName"),
 					">"
 				)
 			)
 		),
-	unescapeWhitespace: function(value) {
-		return value.replace(/ /gm, '\u00a0');
+	escapeWhitespace: function(value) {
+		return escapeWhitespace(value)
 	}
 });
 
@@ -802,7 +802,7 @@ Firebug.XPathPanel.TextNode = domplate(Firebug.XPathPanel.TextElement,
 {
 	tag:
 		DIV({"class": "nodeBox", _repObject: "$object"},
-			SPAN({"class": "nodeText"}, "$object.nodeValue|unescapeWhitespace")
+			SPAN({"class": "nodeText"}, "$object.nodeValue|escapeWhitespace")
 		)
 });
 
@@ -938,6 +938,10 @@ function arrayIterator(array) {
 	}
 }
 
+function escapeWhitespace(value) {
+	return value.replace(' ', '\u00a0', 'gm');
+}
+
 // ************************************************************************************************
 // Global Helpers
 
@@ -1104,7 +1108,7 @@ InsideOutBox.prototype = extend(InsideOutBox.prototype, {
 		
 				// This get the node that contains the text we are looking for
 				nodeToSelect = Array.filter(textNodes, function(textNode) {
-					return textNode.textContent == object.nodeValue;
+					return textNode.textContent == escapeWhitespace(object.nodeValue);
 				})[0];
 			}
 			

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/firexpath.git



More information about the Pkg-mozext-commits mailing list