diff options
-rw-r--r-- | js/lib/blocks.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/js/lib/blocks.js b/js/lib/blocks.js index 86064b5..d53a82f 100644 --- a/js/lib/blocks.js +++ b/js/lib/blocks.js @@ -65,10 +65,10 @@ var detabLine = function(text) { // Return index of match or -1. var matchAt = function(re, s, offset) { var res = s.slice(offset).match(re); - if (res) { - return offset + res.index; - } else { + if (res === null) { return -1; + } else { + return offset + res.index; } }; |