From 337b08ee836a8f2d2032d02e909680bd547dd5a8 Mon Sep 17 00:00:00 2001 From: Vitaly Puzrin Date: Tue, 7 Oct 2014 20:42:08 +0400 Subject: [PATCH] Fix benchmark options (enable html) --- benchmark/implementations/current/index.js | 7 ++++++- benchmark/profile.js | 11 +++++++++-- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/benchmark/implementations/current/index.js b/benchmark/implementations/current/index.js index b0e9faf..2bd8e87 100644 --- a/benchmark/implementations/current/index.js +++ b/benchmark/implementations/current/index.js @@ -1,7 +1,12 @@ 'use strict' var Remarkable = require('../../../'); -var md = new Remarkable(); +var md = new Remarkable({ + html: true, + xhtml: true, + breaks: false, + langprefix: 'language-' +}); exports.run = function(data) { return md.render(data); diff --git a/benchmark/profile.js b/benchmark/profile.js index 789594a..8d4245d 100755 --- a/benchmark/profile.js +++ b/benchmark/profile.js @@ -1,12 +1,19 @@ +#!/usr/bin/env node +/*eslint no-console:0*/ 'use strict'; var fs = require('fs'); var path = require('path'); var Remarkable = require('../'); -var md = new Remarkable(); +var md = new Remarkable({ + html: true, + xhtml: true, + breaks: false, + langprefix: 'language-' +}); -var data = fs.readFileSync(path.join(__dirname, '/samples/lorem1.txt'), 'utf8'); +var data = fs.readFileSync(path.join(__dirname, '/samples/cdata.md'), 'utf8'); for (var i = 0; i < 20000; i++) { md.render(data);