[Pkg-mozext-commits] [firexpath] 08/51: Issue 3 The text wasn't highlighted anymore it is fixed now
David Prévot
taffit at moszumanska.debian.org
Sun Mar 22 15:08:50 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository firexpath.
commit 1336c61f323f2620dfb7095dad5d030d1f970646
Author: pierre.tholence at gmail.com <pierre.tholence at gmail.com@dfa30af4-1965-11df-8728-136f2c2ca76e>
Date: Sun Aug 8 18:51:08 2010 +0000
Issue 3 The text wasn't highlighted anymore it is fixed now
git-svn-id: http://firepath.googlecode.com/svn/trunk@11 dfa30af4-1965-11df-8728-136f2c2ca76e
---
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