76778e70 by Jernej Fijačko Committed by jforbes

Trim whitespace & newlines in line data before feeding it to the parser

1 parent 4fd2994e
......@@ -70,7 +70,7 @@
nextNewline = buffer.indexOf('\n');
for (; nextNewline > -1; nextNewline = buffer.indexOf('\n')) {
this.trigger('data', buffer.substring(0, nextNewline));
this.trigger('data', buffer.substring(0, nextNewline).replace(/^\s+|\s+$/g, ''));
buffer = buffer.substring(nextNewline + 1);
}
};
......