diff options
-rw-r--r-- | lib/js/urweb.js | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/js/urweb.js b/lib/js/urweb.js index a10751e3..05ee2a17 100644 --- a/lib/js/urweb.js +++ b/lib/js/urweb.js @@ -31,11 +31,10 @@ function isLower(c) { return toLower(c) == c && c != toUpper(c); } function isUpper(c) { return toUpper(c) == c && c != toLower(c); } function isAlpha(c) { return isLower(c) || isUpper(c); } function isDigit(c) { - if (c >= '0' && c <= '9') - return true; - var cp = ord(c); - if (cp >= 1632 && cp <= 1641) + if (cp >= 48 && c <= 57) + return true; + else if (cp >= 1632 && cp <= 1641) return true; else if (cp >= 1776 && cp <= 1785) return true; |