Permalink
Browse files

chopping buffer

  • Loading branch information...
elmerbulthuis committed Apr 15, 2012
1 parent 57279ba commit 8e38b1587c560901a5a34bd86a76574a74b005a2
Showing with 1 addition and 2 deletions.
  1. +1 −2 index.js
View
@@ -58,7 +58,7 @@ module.exports = (function(target){
target.prototype.flush = function(bufferSize) {
var token;
while(this.buffer.length > bufferSize && (token = this.nextToken())) {
- this.tokenCallback.call(this, token, this.buffer);
+ this.tokenCallback.call(this, token, this.buffer.substring(0, token.index));
/*
the offset to which we are going to flush.
*/
@@ -93,7 +93,6 @@ module.exports = (function(target){
-
/**
finds the next token in the buffer.
*/

0 comments on commit 8e38b15

Please sign in to comment.