summaryrefslogtreecommitdiff
path: root/js/bench.js
diff options
context:
space:
mode:
authorJohn MacFarlane <jgm@berkeley.edu>2014-12-10 20:58:23 -0800
committerJohn MacFarlane <jgm@berkeley.edu>2014-12-10 21:02:20 -0800
commit81bc461869b5261d5c872393ba779bef84a033ef (patch)
tree753969c6048f74e7bac4c104560e9ddfa21917e3 /js/bench.js
parent1aba0ee439a79078e3d641befb979877f77ac334 (diff)
More linter corrections to js code.
Diffstat (limited to 'js/bench.js')
-rw-r--r--js/bench.js9
1 files changed, 5 insertions, 4 deletions
diff --git a/js/bench.js b/js/bench.js
index d068a7e..f23eb1a 100644
--- a/js/bench.js
+++ b/js/bench.js
@@ -1,5 +1,5 @@
var Benchmark = require('benchmark').Benchmark;
-var suite = new Benchmark.Suite;
+var suite = new Benchmark.Suite();
var fs = require('fs');
var sm = require('./lib/index.js');
// https://github.com/coreyti/showdown
@@ -11,25 +11,26 @@ var benchfile = process.argv[2];
var contents = fs.readFileSync(benchfile, 'utf8');
-// var converter = new showdown.converter();
-
suite.add('commonmark.js markdown->html', function() {
+ "use strict";
var doc = new sm.DocParser().parse(contents);
var renderer = new sm.HtmlRenderer();
renderer.renderBlock(doc);
})
.add('showdown.js markdown->html', function() {
+ "use strict";
var converter = new showdown.converter();
converter.makeHtml(contents);
})
.add('marked.js markdown->html', function() {
+ "use strict";
marked(contents);
})
.on('cycle', function(event) {
+ "use strict";
console.log(String(event.target));
})
.run();
-