diff options
author | John MacFarlane <jgm@berkeley.edu> | 2015-01-09 09:49:39 -0800 |
---|---|---|
committer | John MacFarlane <jgm@berkeley.edu> | 2015-01-09 09:56:20 -0800 |
commit | 6b8f1433347557076140afb35ef4d9f036a658f9 (patch) | |
tree | 014d59efe59a6efc8c4430a8bda987ca2c4e0bae /js/bench.js | |
parent | 996a96c1972697e320a958c0d6bf43e677398f01 (diff) |
js/bench.js: use npm, added markdown-it.
Diffstat (limited to 'js/bench.js')
-rw-r--r-- | js/bench.js | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/js/bench.js b/js/bench.js index f23eb1a..77f5025 100644 --- a/js/bench.js +++ b/js/bench.js @@ -2,10 +2,12 @@ var Benchmark = require('benchmark').Benchmark; var suite = new Benchmark.Suite(); var fs = require('fs'); var sm = require('./lib/index.js'); -// https://github.com/coreyti/showdown -var showdown = require('../../showdown/src/showdown'); -// https://github.com/chjj/marked -var marked = require('../../marked/marked.min.js'); +// npm install showdown +var showdown = require('showdown'); +// npm install marked +var marked = require('marked'); +// npm install markdown-it +var markdownit = require('markdown-it')('commonmark'); var benchfile = process.argv[2]; @@ -29,6 +31,11 @@ suite.add('commonmark.js markdown->html', function() { marked(contents); }) +.add('markdown-it markdown->html', function() { + "use strict"; + markdownit.render(contents); +}) + .on('cycle', function(event) { "use strict"; console.log(String(event.target)); |