diff options
author | yamadapc <tacla.yamada@gmail.com> | 2014-09-04 19:47:45 -0300 |
---|---|---|
committer | yamadapc <tacla.yamada@gmail.com> | 2014-09-04 19:47:45 -0300 |
commit | 4d9b2de5f87bb1dad1a9a061d87f62b332a45dc4 (patch) | |
tree | 689877b9ef5ef1c67cb9727e6804c785e5e0de78 | |
parent | 0a0cdcf1df12ef6a0dcdaf5d37894438aae50bc4 (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.
-rwxr-xr-x | js/markdown | 2 |
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))); }); |