Permalink
Browse files

don't repeat match for newlines in parser

  • Loading branch information...
1 parent 74dfae5 commit 9f4d237f34069e4869ac319d390f8e41d39ab256 @paularmstrong committed Sep 25, 2011
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/parser.js
View
@@ -124,7 +124,7 @@ exports.parse = function (data, tags, autoescape) {
curline = lines;
newlines = token.match(/\n/g);
if (newlines) {
- lines += token.match(/\n/g).length;
+ lines += newlines.length;
}
// Ignore empty strings and comments

0 comments on commit 9f4d237

Please sign in to comment.