summaryrefslogtreecommitdiff
path: root/js
diff options
context:
space:
mode:
authoryamadapc <tacla.yamada@gmail.com>2014-09-04 19:47:45 -0300
committeryamadapc <tacla.yamada@gmail.com>2014-09-04 19:47:45 -0300
commit4d9b2de5f87bb1dad1a9a061d87f62b332a45dc4 (patch)
tree689877b9ef5ef1c67cb9727e6804c785e5e0de78 /js
parent0a0cdcf1df12ef6a0dcdaf5d37894438aae50bc4 (diff)
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.
Diffstat (limited to 'js')
-rwxr-xr-xjs/markdown2
1 files changed, 1 insertions, 1 deletions
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)));
});