projects
/
dygraphs.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #573 from danvk/coverage-cleanup
[dygraphs.git]
/
auto_tests
/
tests
/
Util.js
diff --git
a/auto_tests/tests/Util.js
b/auto_tests/tests/Util.js
index
7c1eaa6
..
8937e43
100644
(file)
--- a/
auto_tests/tests/Util.js
+++ b/
auto_tests/tests/Util.js
@@
-51,11
+51,16
@@
Util.getClassTexts = function(css_class, parent) {
return texts;
};
return texts;
};
+// Convert to a normal space
+Util.nbspToSpace = function(str) {
+ var re = new RegExp(String.fromCharCode(160), 'g');
+ return str.replace(re, ' ');
+};
+
Util.getLegend = function(parent) {
parent = parent || document;
var legend = parent.getElementsByClassName("dygraph-legend")[0];
Util.getLegend = function(parent) {
parent = parent || document;
var legend = parent.getElementsByClassName("dygraph-legend")[0];
- var re = new RegExp(String.fromCharCode(160), 'g');
- return legend.textContent.replace(re, ' ');
+ return Util.nbspToSpace(legend.textContent);
};
/**
};
/**