From 4d9b2de5f87bb1dad1a9a061d87f62b332a45dc4 Mon Sep 17 00:00:00 2001 From: yamadapc Date: Thu, 4 Sep 2014 19:47:45 -0300 Subject: Fix the output of the JS `markdown` executable. Previously, because of `console.log` semantics, if you ran: ``` make test PROG=js/markdown ``` You'd get a couple of errors caused by `console.log` calls putting `\n` line breaks where they shouldn't. This fixes that by using `process.stdout.write` instead of `console.log`. This isn't something really important, but it's nice for all the provided executables to pass the test suite. --- js/markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'js') diff --git a/js/markdown b/js/markdown index 05a372a..2b23d54 100755 --- a/js/markdown +++ b/js/markdown @@ -11,5 +11,5 @@ fs.readFile(file, 'utf8', function(err, data) { } var parser = new stmd.DocParser(); var renderer = new stmd.HtmlRenderer(); - console.log(renderer.render(parser.parse(data))); + process.stdout.write(renderer.render(parser.parse(data))); }); -- cgit v1.2.3