Permalink
Browse files

Update samples to use the preferred API

  • Loading branch information...
1 parent 071ed93 commit 4b7973d6b8dcf8efbc2a15edf234ab2de2baa622 @jmendeth jmendeth committed Sep 11, 2012
Showing with 3 additions and 4 deletions.
  1. +2 −3 bin/robotskirt
  2. +1 −1 examples/ansi-rend.js
View
@@ -29,11 +29,10 @@ var input = new StringStream();
process.stdin.pipe(input);
input.on('end', function () {
//Make the renderer and parser
- var renderer = new rs.HtmlRenderer();
- var parser = new rs.Markdown(renderer);
+ var parser = rs.Markdown.std();
//Parse the data
- var output = parser.renderSync(input.buffer);
+ var output = parser.render(input.buffer.toString());
process.stdout.write(output);
});
View
@@ -103,6 +103,6 @@ function AnsiRenderer(opts) {
var rend = AnsiRenderer()
var md = new rs.Markdown(rend, ~0)
- process.stdout.write(md.renderSync(input));
+ process.stdout.write(md.render(input));
});
process.stdin.resume();

0 comments on commit 4b7973d

Please sign in to comment.