projects
/
evergreen
/
joelewis.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0311148
)
Replaced the Trim regex in Util.js so it passes unittesting.
author
Joseph Lewis
<joehms22@gmail.com>
Tue, 24 Jul 2012 16:58:40 +0000
(10:58 -0600)
committer
Joseph Lewis
<joehms22@gmail.com>
Tue, 24 Jul 2012 16:58:40 +0000
(10:58 -0600)
Signed-off-by: Joseph Lewis <joehms22@gmail.com>
Open-ILS/web/js/dojo/openils/Util.js
patch
|
blob
|
history
diff --git
a/Open-ILS/web/js/dojo/openils/Util.js
b/Open-ILS/web/js/dojo/openils/Util.js
index
5745fad
..
feae75e
100644
(file)
--- a/
Open-ILS/web/js/dojo/openils/Util.js
+++ b/
Open-ILS/web/js/dojo/openils/Util.js
@@
-292,7
+292,7
@@
if(!dojo._hasResource["openils.Util"]) {
* Convenience function to trim leading and trailing whitespace at once.
*/
openils.Util.trimString = function(s) {
- return s.replace(/^\s
*(.+)?\s*$/,"$1
");
+ return s.replace(/^\s
+|\s+$/g,"
");
}
/**