From 24ffae880c13e399d498402e1c52f01dbc83ceea Mon Sep 17 00:00:00 2001 From: Mateus Pinheiro Date: Fri, 7 Nov 2014 18:09:45 -0200 Subject: [PATCH] Fixes vavere/htmltidy#24 by expecting for close instead of end --- htmltidy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htmltidy.js b/htmltidy.js index 6e501da..4c4b0bb 100644 --- a/htmltidy.js +++ b/htmltidy.js @@ -126,7 +126,7 @@ function tidy(text, opts, cb) { worker.on('error', function (data) { error+= data; }); - worker.on('end', function (code) { + worker.on('close', function (code) { cb(error, result); }); worker.end(text);