aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2013-08-07 15:29:54 -0700
committerAlon Zakai <alonzakai@gmail.com>2013-08-07 15:29:54 -0700
commit9734c6dcb98cb70629e50ca6083042783b873b9c (patch)
tree780d3387b9b6a0a1a3894e10465a211dd93ef579 /src
parenta34aed0fb8a553dbd476b1a21eb96fcbf2dab57f (diff)
parent77a5d399c8614bd18f6a7a556f52ac0fc5c273c2 (diff)
Merge pull request #1479 from j4m3z0r/fast_isspace
Workaround for Chrome bug https://code.google.com/p/chromium/issues/deta...
Diffstat (limited to 'src')
-rw-r--r--src/library.js12
1 files changed, 1 insertions, 11 deletions
diff --git a/src/library.js b/src/library.js
index f48220bb..78222b9a 100644
--- a/src/library.js
+++ b/src/library.js
@@ -5704,17 +5704,7 @@ LibraryManager.library = {
(chr >= {{{ charCode('{') }}} && chr <= {{{ charCode('~') }}});
},
isspace: function(chr) {
- switch(chr) {
- case 32:
- case 9:
- case 10:
- case 11:
- case 12:
- case 13:
- return true;
- default:
- return false;
- };
+ return (chr == 32) || (chr >= 9 && chr <= 13);
},
isblank: function(chr) {
return chr == {{{ charCode(' ') }}} || chr == {{{ charCode('\t') }}};