|
|
@ -52,7 +52,7 @@ class RegexBlockStream extends Transform{
|
|
|
|
|
|
|
|
|
|
|
|
_flush(next){
|
|
|
|
_flush(next){
|
|
|
|
if(matchAllOnFlush){ // When requested, we'll match one last time over the remaining buffer
|
|
|
|
if(matchAllOnFlush){ // When requested, we'll match one last time over the remaining buffer
|
|
|
|
let chunk = this.readableBuffer.toString();
|
|
|
|
let chunk = this.readableBuffer.join('');
|
|
|
|
let matches = chunk.match(this.matcher); // Match remaining buffer
|
|
|
|
let matches = chunk.match(this.matcher); // Match remaining buffer
|
|
|
|
_writeMatches(matches); // Write matches including last element
|
|
|
|
_writeMatches(matches); // Write matches including last element
|
|
|
|
}
|
|
|
|
}
|
|
|
|