diff --git a/Gruntfile.js b/Gruntfile.js index 094fdef..b451a2d 100644 --- a/Gruntfile.js +++ b/Gruntfile.js @@ -13,12 +13,12 @@ module.exports = function (grunt) { pkg: grunt.file.readJSON('package.json'), concat: { - options: { - sourceMap: true, - banner: ';/*! <%= pkg.name %> v <%= pkg.version %> - <%= grunt.template.today("dd-mm-yyyy") %> */\n(function(){\n', - footer: '}).call(this);\n' - }, dist: { + options: { + sourceMap: true, + banner: ';/*! <%= pkg.name %> v <%= pkg.version %> - <%= grunt.template.today("dd-mm-yyyy") %> */\n(function(){\n', + footer: '}).call(this);\n' + }, src: [ 'src/options.js', 'src/showdown.js', @@ -30,6 +30,12 @@ module.exports = function (grunt) { ], dest: 'dist/<%= pkg.name %>.js' }, + cli: { + src: [ + 'src/cli/cli.js' + ], + dest: 'bin/showdown.js' + }, test: { src: '<%= concat.dist.src %>', dest: '.build/<%= pkg.name %>.js', @@ -42,14 +48,23 @@ module.exports = function (grunt) { clean: ['.build/'], uglify: { - options: { - sourceMap: true, - banner: '/*! <%= pkg.name %> v <%= pkg.version %> - <%= grunt.template.today("dd-mm-yyyy") %> */' - }, dist: { + options: { + sourceMap: true, + banner: '/*! <%= pkg.name %> v <%= pkg.version %> - <%= grunt.template.today("dd-mm-yyyy") %> */' + }, files: { 'dist/<%= pkg.name %>.min.js': ['<%= concat.dist.dest %>'] } + }, + cli: { + options: { + sourceMap: false, + banner: '#!/usr/bin/env node' + }, + files: { + 'bin/showdown.js': ['<%= concat.cli.dest %>'] + } } }, @@ -136,6 +151,15 @@ module.exports = function (grunt) { ignoreLeaks: false, reporter: 'spec' } + }, + cli: { + src: 'test/node/testsuite.cli.js', + options: { + globals: ['should'], + timeout: 3000, + ignoreLeaks: false, + reporter: 'spec' + } } } }; @@ -202,14 +226,14 @@ module.exports = function (grunt) { /** * Tasks */ - grunt.registerTask('test', ['clean', 'lint', 'concat:test', 'simplemocha:unit', 'simplemocha:functional', 'clean']); grunt.registerTask('test-functional', ['concat:test', 'simplemocha:functional', 'clean']); grunt.registerTask('test-unit', ['concat:test', 'simplemocha:unit', 'clean']); + grunt.registerTask('test-cli', ['clean', 'lint', 'concat:test', 'simplemocha:cli', 'clean']); grunt.registerTask('performance', ['concat:test', 'performancejs', 'clean']); - grunt.registerTask('build', ['test', 'concat:dist', 'uglify', 'endline']); + grunt.registerTask('build', ['test', 'concat:dist', 'concat:cli', 'uglify:dist', 'uglify:cli', 'endline']); grunt.registerTask('build-without-test', ['concat:dist', 'uglify', 'endline']); - grunt.registerTask('prep-release', ['build', 'generate-changelog']); + grunt.registerTask('prep-release', ['build', 'performance', 'generate-changelog']); // Default task(s). grunt.registerTask('default', ['test']); diff --git a/bin/showdown.js b/bin/showdown.js index 4bacdaa..498a80e 100644 Binary files a/bin/showdown.js and b/bin/showdown.js differ diff --git a/dist/showdown.js b/dist/showdown.js index e1d4b37..19e3f02 100644 Binary files a/dist/showdown.js and b/dist/showdown.js differ diff --git a/dist/showdown.js.map b/dist/showdown.js.map index ecf66e3..1a0100f 100644 Binary files a/dist/showdown.js.map and b/dist/showdown.js.map differ diff --git a/dist/showdown.min.js b/dist/showdown.min.js index ef53a7a..009b2d2 100644 Binary files a/dist/showdown.min.js and b/dist/showdown.min.js differ diff --git a/dist/showdown.min.js.map b/dist/showdown.min.js.map index d0be939..4c7cdcd 100644 Binary files a/dist/showdown.min.js.map and b/dist/showdown.min.js.map differ diff --git a/package-lock.json b/package-lock.json index bd5a1bd..2768fd3 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,14 +9,15 @@ "version": "2.0.0-alpha1", "license": "MIT", "dependencies": { - "jsdom": "^19.0.0", - "yargs": "^17.2.1" + "commander": "^9.0.0", + "jsdom": "^19.0.0" }, "bin": { "showdown": "bin/showdown.js" }, "devDependencies": { - "chai": "^4.3.4", + "chai": "*", + "chai-match": "*", "grunt": "^1.4.1", "grunt-contrib-clean": "^2.0.0", "grunt-contrib-concat": "^2.0.0", @@ -32,14 +33,14 @@ "quiet-grunt": "^0.2.0", "semver": "^7.3.0", "semver-sort": "^1.0.0", - "sinon": "^12.0.1", + "sinon": "*", "source-map-support": "^0.5.21" } }, "node_modules/@eslint/eslintrc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz", - "integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", + "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", "dev": true, "dependencies": { "ajv": "^6.12.4", @@ -113,9 +114,9 @@ } }, "node_modules/@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.0.tgz", + "integrity": "sha512-M8vapsv9qQupMdzrVzkn5rb9jG7aUTEPAZdMtME2PuBaefksFZVE2C1g4LBRTkF/k3nRDNbDc5tp5NFC1PEYxA==", "dev": true, "dependencies": { "@sinonjs/commons": "^1.7.0" @@ -257,6 +258,7 @@ "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, "engines": { "node": ">=8" } @@ -265,6 +267,7 @@ "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "dependencies": { "color-convert": "^2.0.1" }, @@ -484,6 +487,12 @@ "node": ">=4" } }, + "node_modules/chai-match": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chai-match/-/chai-match-1.1.1.tgz", + "integrity": "sha1-OfsKLmt8j2OG3P6tSNFIqRX6bEY=", + "dev": true + }, "node_modules/chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -565,6 +574,7 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, "dependencies": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -575,6 +585,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "dependencies": { "color-name": "~1.1.4" }, @@ -585,7 +596,8 @@ "node_modules/color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "node_modules/colors": { "version": "1.1.2", @@ -607,6 +619,14 @@ "node": ">= 0.8" } }, + "node_modules/commander": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", + "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==", + "engines": { + "node": "^12.20.0 || >=14" + } + }, "node_modules/compare-func": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.4.tgz", @@ -1274,7 +1294,8 @@ "node_modules/emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "node_modules/entities": { "version": "1.0.0", @@ -1295,6 +1316,7 @@ "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true, "engines": { "node": ">=6" } @@ -1389,12 +1411,12 @@ } }, "node_modules/eslint": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz", - "integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", + "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", "dev": true, "dependencies": { - "@eslint/eslintrc": "^1.1.0", + "@eslint/eslintrc": "^1.2.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -1806,20 +1828,6 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "node_modules/fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "hasInstallScript": true, - "optional": true, - "os": [ - "darwin" - ], - "engines": { - "node": "^8.16.0 || ^10.6.0 || >=11.0.0" - } - }, "node_modules/function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -1836,6 +1844,7 @@ "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, "engines": { "node": "6.* || 8.* || >= 10.*" } @@ -2978,6 +2987,7 @@ "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, "engines": { "node": ">=8" } @@ -3951,24 +3961,6 @@ "url": "https://github.com/chalk/supports-color?sponsor=1" } }, - "node_modules/mocha/node_modules/yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "dependencies": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - }, - "engines": { - "node": ">=10" - } - }, "node_modules/modify-values": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/modify-values/-/modify-values-1.0.1.tgz", @@ -4732,6 +4724,7 @@ "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true, "engines": { "node": ">=0.10.0" } @@ -4928,16 +4921,16 @@ "dev": true }, "node_modules/sinon": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-12.0.1.tgz", - "integrity": "sha512-iGu29Xhym33ydkAT+aNQFBINakjq69kKO6ByPvTsm3yyIACfyQttRTP03aBP/I8GfhFmLzrnKwNNkr0ORb1udg==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.1.tgz", + "integrity": "sha512-8yx2wIvkBjIq/MGY1D9h1LMraYW+z1X0mb648KZnKSdvLasvDu7maa0dFaNYdTDczFgbjNw2tOmWdTk9saVfwQ==", "dev": true, "dependencies": { "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^8.1.0", - "@sinonjs/samsam": "^6.0.2", + "@sinonjs/fake-timers": "^9.0.0", + "@sinonjs/samsam": "^6.1.1", "diff": "^5.0.0", - "nise": "^5.1.0", + "nise": "^5.1.1", "supports-color": "^7.2.0" }, "funding": { @@ -5045,6 +5038,7 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "dependencies": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -5058,6 +5052,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "dependencies": { "ansi-regex": "^5.0.1" }, @@ -5252,9 +5247,9 @@ "dev": true }, "node_modules/uglify-js": { - "version": "3.15.1", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.1.tgz", - "integrity": "sha512-FAGKF12fWdkpvNJZENacOH0e/83eG6JyVQyanIJaBXCN1J11TUQv1T1/z8S+Z0CG0ZPk1nPcreF/c7lrTd0TEQ==", + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.2.tgz", + "integrity": "sha512-peeoTk3hSwYdoc9nrdiEJk+gx1ALCtTjdYuKSXMTDqq7n1W7dHPqWDdSi+BPL0ni2YMeHD7hKUSdbj3TZauY2A==", "dev": true, "bin": { "uglifyjs": "bin/uglifyjs" @@ -5459,6 +5454,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, "dependencies": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -5523,6 +5519,7 @@ "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, "engines": { "node": ">=10" } @@ -5534,20 +5531,21 @@ "dev": true }, "node_modules/yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, "dependencies": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.3", + "string-width": "^4.2.0", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" + "yargs-parser": "^20.2.2" }, "engines": { - "node": ">=12" + "node": ">=10" } }, "node_modules/yargs-parser": { @@ -5607,14 +5605,6 @@ "node": ">=8" } }, - "node_modules/yargs/node_modules/yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==", - "engines": { - "node": ">=12" - } - }, "node_modules/yocto-queue": { "version": "0.1.0", "resolved": "https://registry.npmjs.org/yocto-queue/-/yocto-queue-0.1.0.tgz", @@ -5630,9 +5620,9 @@ }, "dependencies": { "@eslint/eslintrc": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.1.0.tgz", - "integrity": "sha512-C1DfL7XX4nPqGd6jcP01W9pVM1HYCuUkFk1432D7F0v3JSlUIeOYn9oCoi3eoLZ+iwBSb29BMFxxny0YrrEZqg==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-1.2.0.tgz", + "integrity": "sha512-igm9SjJHNEJRiUnecP/1R5T3wKLEJ7pL6e2P+GUSfCd0dGjPYYZve08uzw8L2J8foVHFz+NGu12JxRcU2gGo6w==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -5696,9 +5686,9 @@ } }, "@sinonjs/fake-timers": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-8.1.0.tgz", - "integrity": "sha512-OAPJUAtgeINhh/TAlUID4QTs53Njm7xzddaVlEs/SXwgtiD1tW22zAB/W1wdqfrpmikgaWQ9Fw6Ws+hsiRm5Vg==", + "version": "9.1.0", + "resolved": "https://registry.npmjs.org/@sinonjs/fake-timers/-/fake-timers-9.1.0.tgz", + "integrity": "sha512-M8vapsv9qQupMdzrVzkn5rb9jG7aUTEPAZdMtME2PuBaefksFZVE2C1g4LBRTkF/k3nRDNbDc5tp5NFC1PEYxA==", "dev": true, "requires": { "@sinonjs/commons": "^1.7.0" @@ -5811,12 +5801,14 @@ "ansi-regex": { "version": "5.0.1", "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", - "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==" + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true }, "ansi-styles": { "version": "4.3.0", "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, "requires": { "color-convert": "^2.0.1" } @@ -5988,6 +5980,12 @@ "type-detect": "^4.0.5" } }, + "chai-match": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/chai-match/-/chai-match-1.1.1.tgz", + "integrity": "sha1-OfsKLmt8j2OG3P6tSNFIqRX6bEY=", + "dev": true + }, "chalk": { "version": "4.1.2", "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", @@ -6045,6 +6043,7 @@ "version": "7.0.4", "resolved": "https://registry.npmjs.org/cliui/-/cliui-7.0.4.tgz", "integrity": "sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==", + "dev": true, "requires": { "string-width": "^4.2.0", "strip-ansi": "^6.0.0", @@ -6055,6 +6054,7 @@ "version": "2.0.1", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, "requires": { "color-name": "~1.1.4" } @@ -6062,7 +6062,8 @@ "color-name": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true }, "colors": { "version": "1.1.2", @@ -6078,6 +6079,11 @@ "delayed-stream": "~1.0.0" } }, + "commander": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-9.0.0.tgz", + "integrity": "sha512-JJfP2saEKbQqvW+FI93OYUB4ByV5cizMpFMiiJI8xDbBvQvSkIk0VvQdn1CZ8mqAO8Loq2h0gYTYtDFUZUeERw==" + }, "compare-func": { "version": "1.3.4", "resolved": "https://registry.npmjs.org/compare-func/-/compare-func-1.3.4.tgz", @@ -6635,7 +6641,8 @@ "emoji-regex": { "version": "8.0.0", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", - "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==" + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true }, "entities": { "version": "1.0.0", @@ -6655,7 +6662,8 @@ "escalade": { "version": "3.1.1", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.1.tgz", - "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==" + "integrity": "sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==", + "dev": true }, "escape-string-regexp": { "version": "4.0.0", @@ -6719,12 +6727,12 @@ } }, "eslint": { - "version": "8.9.0", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.9.0.tgz", - "integrity": "sha512-PB09IGwv4F4b0/atrbcMFboF/giawbBLVC7fyDamk5Wtey4Jh2K+rYaBhCAbUyEI4QzB1ly09Uglc9iCtFaG2Q==", + "version": "8.10.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-8.10.0.tgz", + "integrity": "sha512-tcI1D9lfVec+R4LE1mNDnzoJ/f71Kl/9Cv4nG47jOueCMBrCCKYXr4AUVS7go6mWYGFD4+EoN6+eXSrEbRzXVw==", "dev": true, "requires": { - "@eslint/eslintrc": "^1.1.0", + "@eslint/eslintrc": "^1.2.0", "@humanwhocodes/config-array": "^0.9.2", "ajv": "^6.10.0", "chalk": "^4.0.0", @@ -7041,13 +7049,6 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "fsevents": { - "version": "2.3.2", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.2.tgz", - "integrity": "sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==", - "dev": true, - "optional": true - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -7063,7 +7064,8 @@ "get-caller-file": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", - "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==" + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true }, "get-func-name": { "version": "2.0.0", @@ -7941,7 +7943,8 @@ "is-fullwidth-code-point": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", - "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==" + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true }, "is-glob": { "version": "4.0.3", @@ -8686,21 +8689,6 @@ "requires": { "has-flag": "^4.0.0" } - }, - "yargs": { - "version": "16.2.0", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", - "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", - "dev": true, - "requires": { - "cliui": "^7.0.2", - "escalade": "^3.1.1", - "get-caller-file": "^2.0.5", - "require-directory": "^2.1.1", - "string-width": "^4.2.0", - "y18n": "^5.0.5", - "yargs-parser": "^20.2.2" - } } } }, @@ -9293,7 +9281,8 @@ "require-directory": { "version": "2.1.1", "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", - "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true }, "resolve": { "version": "1.22.0", @@ -9437,16 +9426,16 @@ "dev": true }, "sinon": { - "version": "12.0.1", - "resolved": "https://registry.npmjs.org/sinon/-/sinon-12.0.1.tgz", - "integrity": "sha512-iGu29Xhym33ydkAT+aNQFBINakjq69kKO6ByPvTsm3yyIACfyQttRTP03aBP/I8GfhFmLzrnKwNNkr0ORb1udg==", + "version": "13.0.1", + "resolved": "https://registry.npmjs.org/sinon/-/sinon-13.0.1.tgz", + "integrity": "sha512-8yx2wIvkBjIq/MGY1D9h1LMraYW+z1X0mb648KZnKSdvLasvDu7maa0dFaNYdTDczFgbjNw2tOmWdTk9saVfwQ==", "dev": true, "requires": { "@sinonjs/commons": "^1.8.3", - "@sinonjs/fake-timers": "^8.1.0", - "@sinonjs/samsam": "^6.0.2", + "@sinonjs/fake-timers": "^9.0.0", + "@sinonjs/samsam": "^6.1.1", "diff": "^5.0.0", - "nise": "^5.1.0", + "nise": "^5.1.1", "supports-color": "^7.2.0" } }, @@ -9543,6 +9532,7 @@ "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, "requires": { "emoji-regex": "^8.0.0", "is-fullwidth-code-point": "^3.0.0", @@ -9553,6 +9543,7 @@ "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, "requires": { "ansi-regex": "^5.0.1" } @@ -9693,9 +9684,9 @@ "dev": true }, "uglify-js": { - "version": "3.15.1", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.1.tgz", - "integrity": "sha512-FAGKF12fWdkpvNJZENacOH0e/83eG6JyVQyanIJaBXCN1J11TUQv1T1/z8S+Z0CG0ZPk1nPcreF/c7lrTd0TEQ==", + "version": "3.15.2", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.15.2.tgz", + "integrity": "sha512-peeoTk3hSwYdoc9nrdiEJk+gx1ALCtTjdYuKSXMTDqq7n1W7dHPqWDdSi+BPL0ni2YMeHD7hKUSdbj3TZauY2A==", "dev": true }, "unc-path-regex": { @@ -9856,6 +9847,7 @@ "version": "7.0.0", "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, "requires": { "ansi-styles": "^4.0.0", "string-width": "^4.1.0", @@ -9893,7 +9885,8 @@ "y18n": { "version": "5.0.8", "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", - "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==" + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true }, "yallist": { "version": "4.0.0", @@ -9902,24 +9895,18 @@ "dev": true }, "yargs": { - "version": "17.3.1", - "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.3.1.tgz", - "integrity": "sha512-WUANQeVgjLbNsEmGk20f+nlHgOqzRFpiGWVaBrYGYIGANIIu3lWjoyi0fNlFmJkvfhCZ6BXINe7/W2O2bV4iaA==", + "version": "16.2.0", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-16.2.0.tgz", + "integrity": "sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==", + "dev": true, "requires": { "cliui": "^7.0.2", "escalade": "^3.1.1", "get-caller-file": "^2.0.5", "require-directory": "^2.1.1", - "string-width": "^4.2.3", + "string-width": "^4.2.0", "y18n": "^5.0.5", - "yargs-parser": "^21.0.0" - }, - "dependencies": { - "yargs-parser": { - "version": "21.0.0", - "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.0.0.tgz", - "integrity": "sha512-z9kApYUOCwoeZ78rfRYYWdiU/iNL6mwwYlkkZfJoyMR1xps+NEBX5X7XmRpxkZHhXJ6+Ey00IwKxBBSW9FIjyA==" - } + "yargs-parser": "^20.2.2" } }, "yargs-parser": { diff --git a/package.json b/package.json index 6c7fc21..6b76134 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "showdown", - "version": "2.0.0-alpha1", + "version": "2.0.0", "description": "A Markdown to HTML converter written in Javascript", "author": "Estevão Santos", "homepage": "http://showdownjs.com/", @@ -38,8 +38,13 @@ "bin": { "showdown": "bin/showdown.js" }, + "files": [ + "bin", + "dist" + ], "devDependencies": { - "chai": "^4.3.4", + "chai": "*", + "chai-match": "*", "grunt": "^1.4.1", "grunt-contrib-clean": "^2.0.0", "grunt-contrib-concat": "^2.0.0", @@ -55,11 +60,11 @@ "quiet-grunt": "^0.2.0", "semver": "^7.3.0", "semver-sort": "^1.0.0", - "sinon": "^12.0.1", + "sinon": "*", "source-map-support": "^0.5.21" }, "dependencies": { "jsdom": "^19.0.0", - "yargs": "^17.2.1" + "commander": "^9.0.0" } } diff --git a/performance.json b/performance.json index 419de8c..d6e8129 100644 --- a/performance.json +++ b/performance.json @@ -1 +1 @@ -{"2.0.0-alpha1":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.3295993199999703,"maxTime":9.462411999999858,"minTime":0.08558300000004238},{"name":"performance.testfile.md","time":32.21012696000001,"maxTime":56.634641999999985,"minTime":27.394886999999926}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.054658400000017,"maxTime":7.506043000000318,"minTime":2.412612999999965},{"name":"anchors","time":0.3422439500000337,"maxTime":0.5999899999997069,"minTime":0.2859809999999925},{"name":"autoLinks","time":0.0914297999999917,"maxTime":0.19316600000001927,"minTime":0.07021499999973457},{"name":"blockQuotes","time":2.8961157999999614,"maxTime":5.99115299999994,"minTime":1.9874079999999594},{"name":"codeBlocks","time":0.30285735000002206,"maxTime":1.577871999999843,"minTime":0.1898510000000897},{"name":"codeSpans","time":0.2851982500000304,"maxTime":0.5330900000003567,"minTime":0.23746500000015658},{"name":"detab","time":0.13642154999995454,"maxTime":0.8733140000003914,"minTime":0.08648799999991752},{"name":"encodeAmpsAndAngles","time":0.10381534999999076,"maxTime":0.16604400000005626,"minTime":0.0967329999998583},{"name":"encodeBackslashEscapes","time":0.08116885000008552,"maxTime":0.1410319999999956,"minTime":0.06840599999986807},{"name":"encodeCode","time":0.9420372499999985,"maxTime":1.3416130000000521,"minTime":0.8504109999998946},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.21206050000000687,"maxTime":0.43575300000020434,"minTime":0.1585109999996348},{"name":"githubCodeBlocks","time":0.1756723499999225,"maxTime":0.3049670000000333,"minTime":0.14284100000031685},{"name":"hashBlock","time":0.04682985000001736,"maxTime":0.09371999999984837,"minTime":0.035859999999956926},{"name":"hashElement","time":0.002938149999977213,"maxTime":0.04610599999978149,"minTime":0.0006019999996169645},{"name":"hashHTMLSpans","time":4.2764674000000245,"maxTime":5.772070999999869,"minTime":3.9645690000002105},{"name":"hashPreCodeTags","time":0.14422639999997955,"maxTime":0.32425300000022617,"minTime":0.10999300000003132},{"name":"headers","time":1.4178700999999592,"maxTime":4.437690000000202,"minTime":1.0619599999999991},{"name":"horizontalRule","time":0.22733904999997775,"maxTime":0.40320699999983844,"minTime":0.19527500000003783},{"name":"images","time":0.17464789999999084,"maxTime":0.43484899999975823,"minTime":0.12867699999969773},{"name":"italicsAndBold","time":0.3753021499999932,"maxTime":2.406887999999981,"minTime":0.22812300000032337},{"name":"lists","time":2.918400549999956,"maxTime":3.7162560000001577,"minTime":2.5262219999999616},{"name":"outdent","time":0.16441669999999248,"maxTime":0.26970799999980954,"minTime":0.1377169999996113},{"name":"paragraphs","time":6.44426390000001,"maxTime":8.106032000000141,"minTime":5.7588120000000345},{"name":"spanGamut","time":4.293749849999995,"maxTime":6.106268999999884,"minTime":3.8419189999999617},{"name":"strikethrough","time":0.005092600000057246,"maxTime":0.08950099999992744,"minTime":0.0003010000000358559},{"name":"stripLinkDefinitions","time":0.2301113500000156,"maxTime":0.2862839999997959,"minTime":0.22088999999959924},{"name":"tables","time":0.002440799999999399,"maxTime":0.03375099999993836,"minTime":0.0006019999996169645},{"name":"unescapeSpecialChars","time":0.011044549999951414,"maxTime":0.07985800000005838,"minTime":0.007231999999930849}]}],"1.9.0":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.47623109999999996,"maxTime":9.944885,"minTime":0.0876940000000559},{"name":"performance.testfile.md","time":32.20845420000003,"maxTime":61.88545199999999,"minTime":28.234484000000066}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":5.827436050000029,"maxTime":23.030151000000387,"minTime":2.428888999999799},{"name":"anchors","time":0.36267595000003894,"maxTime":0.6361520000000382,"minTime":0.2944200000001729},{"name":"autoLinks","time":0.11954594999999699,"maxTime":0.3191310000001977,"minTime":0.07081800000014482},{"name":"blockQuotes","time":2.8835528000000297,"maxTime":6.237062000000151,"minTime":2.040447000000313},{"name":"codeBlocks","time":0.2899901999999884,"maxTime":1.1309700000001612,"minTime":0.18894700000009834},{"name":"codeSpans","time":0.31439960000000156,"maxTime":0.8751229999998031,"minTime":0.23414999999977226},{"name":"detab","time":0.09471464999996897,"maxTime":0.14133399999991525,"minTime":0.08558300000004238},{"name":"encodeAmpsAndAngles","time":0.15546699999999875,"maxTime":1.1864189999996597,"minTime":0.09462400000029447},{"name":"encodeBackslashEscapes","time":0.08662335000003622,"maxTime":0.14434700000037992,"minTime":0.06931000000031418},{"name":"encodeCode","time":0.9182015000000092,"maxTime":1.278632000000016,"minTime":0.865179000000353},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.2454204000000118,"maxTime":0.7105860000001485,"minTime":0.1564010000001872},{"name":"githubCodeBlocks","time":0.1596106000000191,"maxTime":0.2905020000002878,"minTime":0.1422379999999066},{"name":"hashBlock","time":0.042761799999971116,"maxTime":0.06659899999976915,"minTime":0.037669000000278174},{"name":"hashElement","time":0.002787500000044929,"maxTime":0.034654999999929714,"minTime":0.0003010000000358559},{"name":"hashHTMLSpans","time":4.27261539999995,"maxTime":6.303661999999804,"minTime":3.9832579999997506},{"name":"hashPreCodeTags","time":0.13292590000003202,"maxTime":0.34384200000022247,"minTime":0.10999300000003132},{"name":"headers","time":1.453898150000009,"maxTime":3.8741690000001654,"minTime":1.0984250000001339},{"name":"horizontalRule","time":0.23021724999998697,"maxTime":0.30014500000015687,"minTime":0.20190500000035172},{"name":"images","time":0.19111685000000306,"maxTime":0.4761349999998856,"minTime":0.13530599999967308},{"name":"italicsAndBold","time":0.30972870000000513,"maxTime":0.8660830000003443,"minTime":0.23565599999983533},{"name":"lists","time":3.1345930500000123,"maxTime":4.249350999999933,"minTime":2.6624360000000706},{"name":"outdent","time":0.16700869999999668,"maxTime":0.2621750000002976,"minTime":0.1398260000000846},{"name":"paragraphs","time":6.382811100000003,"maxTime":7.885451999999987,"minTime":5.680467000000135},{"name":"spanGamut","time":4.106134100000008,"maxTime":5.309806000000208,"minTime":3.6981800000003204},{"name":"strikethrough","time":0.004791549999981726,"maxTime":0.08678899999995338,"minTime":0.0003010000000358559},{"name":"stripLinkDefinitions","time":0.24528460000003632,"maxTime":0.3763870000002498,"minTime":0.220890000000054},{"name":"tables","time":0.00311890000002677,"maxTime":0.049421000000165805,"minTime":0.0006020000000717118},{"name":"unescapeSpecialChars","time":0.01015549999999621,"maxTime":0.0569550000000163,"minTime":0.006930999999894993}]}],"1.8.4":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.7357727200000045,"maxTime":11.075555000000008,"minTime":0.11662300000000414},{"name":"performance.testfile.md","time":32.917593419999996,"maxTime":62.42667800000004,"minTime":27.940666000000192}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":5.259524950000037,"maxTime":17.332808000000114,"minTime":2.340292000000318},{"name":"anchors","time":0.5218948500000351,"maxTime":2.8983949999997094,"minTime":0.306775000000016},{"name":"autoLinks","time":0.12436755000001085,"maxTime":0.30014600000004066,"minTime":0.07142100000010032},{"name":"blockQuotes","time":2.24432690000001,"maxTime":3.3329420000000027,"minTime":2.0148330000001806},{"name":"codeBlocks","time":0.24412445000000388,"maxTime":0.8169630000002144,"minTime":0.19015300000000934},{"name":"codeSpans","time":0.3541780499999959,"maxTime":1.2014869999998155,"minTime":0.24288900000010472},{"name":"detab","time":0.09634199999998146,"maxTime":0.1431420000003527,"minTime":0.08769299999994473},{"name":"encodeAmpsAndAngles","time":0.1376722000000427,"maxTime":0.19768599999997605,"minTime":0.09613100000024133},{"name":"encodeBackslashEscapes","time":0.0932680999999775,"maxTime":0.1841260000001057,"minTime":0.07051599999977043},{"name":"encodeCode","time":0.9610537499999964,"maxTime":1.6110220000000481,"minTime":0.8582480000000032},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.2516583999999966,"maxTime":0.5204329999996844,"minTime":0.1582090000001699},{"name":"githubCodeBlocks","time":0.26234104999991814,"maxTime":0.3896469999999681,"minTime":0.16092100000014398},{"name":"hashBlock","time":0.051877600000034364,"maxTime":0.12867700000015247,"minTime":0.03736699999990378},{"name":"hashElement","time":0.002682149999986905,"maxTime":0.040380999999797496,"minTime":0.0003020000003743917},{"name":"hashHTMLSpans","time":4.239888850000034,"maxTime":4.673051000000214,"minTime":4.043529000000035},{"name":"hashPreCodeTags","time":0.13398059999999531,"maxTime":0.3372110000000248,"minTime":0.11270500000000538},{"name":"headers","time":1.4121460499999785,"maxTime":4.474761999999828,"minTime":1.076727000000119},{"name":"horizontalRule","time":0.3580051499999854,"maxTime":2.6859419999996135,"minTime":0.19648099999994884},{"name":"images","time":0.18359815000001162,"maxTime":0.4803540000002613,"minTime":0.13048499999968044},{"name":"italicsAndBold","time":0.29952790000002094,"maxTime":0.4577519999998003,"minTime":0.23414999999977226},{"name":"lists","time":3.073871250000002,"maxTime":4.651354000000083,"minTime":2.6256719999996676},{"name":"outdent","time":0.20359270000003563,"maxTime":0.9311750000001666,"minTime":0.13681300000007468},{"name":"paragraphs","time":6.405547999999953,"maxTime":8.019855000000007,"minTime":5.821198000000095},{"name":"spanGamut","time":4.135636349999913,"maxTime":6.038471999999729,"minTime":3.839814999999817},{"name":"strikethrough","time":0.007217349999996259,"maxTime":0.1319909999997435,"minTime":0.0003010000000358559},{"name":"stripLinkDefinitions","time":0.24829814999998234,"maxTime":0.40260499999976673,"minTime":0.21667100000013306},{"name":"tables","time":0.0033450000000129878,"maxTime":0.04008000000021639,"minTime":0.0006029999999555002},{"name":"unescapeSpecialChars","time":0.009387199999969198,"maxTime":0.03947699999980614,"minTime":0.006930999999894993}]}],"1.8.3":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.9269011799999908,"maxTime":32.65378700000008,"minTime":0.14705900000001293},{"name":"performance.testfile.md","time":32.484542280000035,"maxTime":62.282010000000014,"minTime":28.40262900000016}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":5.454346750000013,"maxTime":18.356191000000308,"minTime":2.3848909999996977},{"name":"anchors","time":0.504325800000015,"maxTime":3.1102430000000822,"minTime":0.2902009999997972},{"name":"autoLinks","time":0.11421199999999772,"maxTime":0.28417399999989357,"minTime":0.06931099999974322},{"name":"blockQuotes","time":2.268720650000046,"maxTime":3.373623999999836,"minTime":1.996752000000015},{"name":"codeBlocks","time":0.2502117500000395,"maxTime":0.8398649999999179,"minTime":0.19196000000010827},{"name":"codeSpans","time":0.3517671000000064,"maxTime":1.230717999999797,"minTime":0.2486149999999725},{"name":"detab","time":0.11473945000000185,"maxTime":0.17900200000030964,"minTime":0.08739199999990888},{"name":"encodeAmpsAndAngles","time":0.10544264999996358,"maxTime":0.16212700000005498,"minTime":0.09462399999983973},{"name":"encodeBackslashEscapes","time":0.10833570000006602,"maxTime":0.2347530000001825,"minTime":0.07503700000006575},{"name":"encodeCode","time":0.9939308499999925,"maxTime":1.9153870000000097,"minTime":0.8467970000001515},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.23689210000002275,"maxTime":0.4746280000003935,"minTime":0.1600180000000364},{"name":"githubCodeBlocks","time":0.2020106000000169,"maxTime":0.7714579999997113,"minTime":0.15127899999970396},{"name":"hashBlock","time":0.07104355000003579,"maxTime":0.4927090000001044,"minTime":0.03917600000022503},{"name":"hashElement","time":0.0024862499999926515,"maxTime":0.036463999999796215,"minTime":0.0006019999996169645},{"name":"hashHTMLSpans","time":4.161957949999987,"maxTime":4.708306999999877,"minTime":3.9594499999998334},{"name":"hashPreCodeTags","time":0.1303646000000299,"maxTime":0.3314860000000408,"minTime":0.11240400000042428},{"name":"headers","time":1.4091020500000013,"maxTime":4.621517999999924,"minTime":1.043880000000172},{"name":"horizontalRule","time":0.3509834499999897,"maxTime":2.6549019999997654,"minTime":0.19617999999991298},{"name":"images","time":0.19913270000001831,"maxTime":0.5445410000002084,"minTime":0.1307859999997163},{"name":"italicsAndBold","time":0.268699450000031,"maxTime":0.35710100000005696,"minTime":0.23475200000029872},{"name":"lists","time":3.0566478999999847,"maxTime":4.403038999999808,"minTime":2.6856400000001486},{"name":"outdent","time":0.15278490000002876,"maxTime":0.3073779999999715,"minTime":0.13621100000000297},{"name":"paragraphs","time":6.455042899999944,"maxTime":7.90051799999992,"minTime":5.708189999999831},{"name":"spanGamut","time":4.255919250000034,"maxTime":5.54154299999982,"minTime":3.929916999999932},{"name":"strikethrough","time":0.005107850000035797,"maxTime":0.08889899999985573,"minTime":0.0003010000000358559},{"name":"stripLinkDefinitions","time":0.24843364999996992,"maxTime":0.3935639999999694,"minTime":0.22480699999960052},{"name":"tables","time":0.0021395500000380707,"maxTime":0.028025000000070577,"minTime":0.0006020000000717118},{"name":"unescapeSpecialChars","time":0.008935100000007879,"maxTime":0.03887399999985064,"minTime":0.006930999999894993}]}],"1.8.2":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.36118707999999744,"maxTime":8.97694100000001,"minTime":0.10366399999998066},{"name":"performance.testfile.md","time":33.109353200000044,"maxTime":56.477973000000134,"minTime":29.178900000000112}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":5.488247100000035,"maxTime":20.713954999999714,"minTime":2.3207030000003215},{"name":"anchors","time":0.5058775499999456,"maxTime":3.1581569999998464,"minTime":0.29200900000023466},{"name":"autoLinks","time":0.14073085000002267,"maxTime":0.36463400000002366,"minTime":0.07232500000009168},{"name":"blockQuotes","time":2.3000001499999825,"maxTime":3.6421259999997346,"minTime":2.046473999999762},{"name":"codeBlocks","time":0.24317504999999073,"maxTime":0.8772320000002765,"minTime":0.18924799999967945},{"name":"codeSpans","time":0.26844330000001265,"maxTime":1.1755699999998797,"minTime":0.1594150000000809},{"name":"detab","time":0.0950761500000226,"maxTime":0.17207199999984368,"minTime":0.0891990000000078},{"name":"encodeAmpsAndAngles","time":0.10803434999995716,"maxTime":0.22993099999985134,"minTime":0.09733700000015233},{"name":"encodeBackslashEscapes","time":0.07844164999999066,"maxTime":0.11903299999994488,"minTime":0.07413300000007439},{"name":"encodeCode","time":1.0021724500000346,"maxTime":1.5441220000002431,"minTime":0.850713999999698},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.25580170000000635,"maxTime":0.5656359999998131,"minTime":0.16363400000000183},{"name":"githubCodeBlocks","time":0.2531047000000399,"maxTime":0.9986770000000433,"minTime":0.15248300000030213},{"name":"hashBlock","time":0.04166155000000345,"maxTime":0.08015899999963949,"minTime":0.037066000000322674},{"name":"hashElement","time":0.002244949999999335,"maxTime":0.0322439999999915,"minTime":0.00030099999958110857},{"name":"hashHTMLSpans","time":4.444473249999987,"maxTime":5.282380000000103,"minTime":3.9871729999999843},{"name":"hashPreCodeTags","time":0.15179035000001023,"maxTime":0.2648869999998169,"minTime":0.11722499999996217},{"name":"headers","time":1.4647912000000134,"maxTime":4.970481000000291,"minTime":1.0589469999999892},{"name":"horizontalRule","time":0.24510365000001003,"maxTime":0.5623199999999997,"minTime":0.20461699999987104},{"name":"images","time":0.31239540000003674,"maxTime":2.6151230000000396,"minTime":0.1310880000000907},{"name":"italicsAndBold","time":0.287217499999997,"maxTime":0.42671299999983603,"minTime":0.24379300000009607},{"name":"lists","time":3.260661600000026,"maxTime":4.098372000000381,"minTime":2.7923170000003665},{"name":"outdent","time":0.17895719999999074,"maxTime":0.37729099999978644,"minTime":0.1410319999999956},{"name":"paragraphs","time":6.661300749999964,"maxTime":9.04655300000013,"minTime":5.883574999999837},{"name":"spanGamut","time":4.560794749999991,"maxTime":6.1731730000001335,"minTime":4.0085690000000795},{"name":"strikethrough","time":0.005469599999855745,"maxTime":0.09703499999977794,"minTime":0.00030099999958110857},{"name":"stripLinkDefinitions","time":0.25079934999998843,"maxTime":0.4017010000002301,"minTime":0.21576699999968696},{"name":"tables","time":0.005861300000015035,"maxTime":0.08618700000033641,"minTime":0.001205000000027212},{"name":"unescapeSpecialChars","time":0.013244550000035816,"maxTime":0.06358499999987544,"minTime":0.007835999999770138}]}],"1.8.0":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.3569385800000009,"maxTime":9.000459999999975,"minTime":0.09070699999995213},{"name":"performance.testfile.md","time":31.433715060000004,"maxTime":57.438766999999984,"minTime":26.734683000000132}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.177346950000015,"maxTime":7.660953999999947,"minTime":2.346321999999873},{"name":"anchors","time":0.541678950000005,"maxTime":3.749413000000004,"minTime":0.30014600000004066},{"name":"autoLinks","time":0.08653315000001385,"maxTime":0.18322200000011435,"minTime":0.06931100000019796},{"name":"blockQuotes","time":2.048646549999944,"maxTime":3.5523299999999836,"minTime":1.8153400000001056},{"name":"codeBlocks","time":0.26372769999998125,"maxTime":1.1626129999999648,"minTime":0.18472799999972267},{"name":"codeSpans","time":0.27142715000002227,"maxTime":0.7904450000000907,"minTime":0.16303100000004633},{"name":"detab","time":0.09152044999998452,"maxTime":0.11963699999978417,"minTime":0.08648700000003373},{"name":"encodeAmpsAndAngles","time":0.10590985000001182,"maxTime":0.14615600000024642,"minTime":0.09703500000023269},{"name":"encodeBackslashEscapes","time":0.09130940000002283,"maxTime":0.15218199999981152,"minTime":0.07684500000004846},{"name":"encodeCode","time":0.961777750000033,"maxTime":1.551958999999897,"minTime":0.8615639999998166},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.23877579999996215,"maxTime":0.48698400000012043,"minTime":0.17297599999983504},{"name":"githubCodeBlocks","time":0.22202060000001894,"maxTime":0.9139990000003309,"minTime":0.1404299999999239},{"name":"hashBlock","time":0.0631934499999943,"maxTime":0.402002999999695,"minTime":0.035257999999885214},{"name":"hashElement","time":0.0014766499999950612,"maxTime":0.02531300000009651,"minTime":0},{"name":"hashHTMLSpans","time":4.30338740000002,"maxTime":4.888522000000194,"minTime":4.0212320000000545},{"name":"hashPreCodeTags","time":0.16443229999997583,"maxTime":0.5409259999996721,"minTime":0.11029499999995096},{"name":"headers","time":1.1587860999999975,"maxTime":3.7789459999999053,"minTime":0.9682419999999183},{"name":"horizontalRule","time":0.2442149499999914,"maxTime":0.4185769999999138,"minTime":0.1940709999998944},{"name":"images","time":0.32417875000003277,"maxTime":3.0575109999999768,"minTime":0.13319700000010926},{"name":"italicsAndBold","time":0.28938759999996366,"maxTime":0.41917899999998554,"minTime":0.23656099999971048},{"name":"lists","time":2.6713588999999955,"maxTime":3.1388750000000982,"minTime":2.4942840000003343},{"name":"outdent","time":0.15887245000001257,"maxTime":0.2525319999999738,"minTime":0.13862199999994118},{"name":"paragraphs","time":5.593502349999949,"maxTime":6.832538999999997,"minTime":5.159435999999914},{"name":"spanGamut","time":5.069422249999979,"maxTime":9.599546000000373,"minTime":4.127910000000156},{"name":"strikethrough","time":0.003405200000020159,"maxTime":0.062079000000267115,"minTime":0},{"name":"stripLinkDefinitions","time":0.2712614000000258,"maxTime":0.4004960000002029,"minTime":0.22480799999993906},{"name":"tables","time":0.0018532499999764696,"maxTime":0.03103899999996429,"minTime":0},{"name":"unescapeSpecialChars","time":0.008362499999998363,"maxTime":0.03797099999974307,"minTime":0.006628999999975349}]}],"1.7.6":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.3132123199999978,"maxTime":6.2674990000000435,"minTime":0.09161100000005717},{"name":"performance.testfile.md","time":30.962222960000013,"maxTime":54.58250999999996,"minTime":26.38147600000002}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.098720800000001,"maxTime":7.07210699999996,"minTime":2.3604820000000473},{"name":"anchors","time":0.573802499999988,"maxTime":4.501581999999871,"minTime":0.2944200000001729},{"name":"autoLinks","time":0.08704519999992044,"maxTime":0.21034299999973882,"minTime":0.06629800000018804},{"name":"blockQuotes","time":2.176025850000019,"maxTime":4.601932000000033,"minTime":1.8228730000000724},{"name":"codeBlocks","time":0.2823659499999621,"maxTime":0.8853699999999662,"minTime":0.19256300000006377},{"name":"codeSpans","time":0.26464649999998074,"maxTime":0.7636240000001635,"minTime":0.16604400000005626},{"name":"detab","time":0.10188689999999952,"maxTime":0.15459400000008827,"minTime":0.09070699999983844},{"name":"encodeAmpsAndAngles","time":0.1072658999999021,"maxTime":0.17538599999988946,"minTime":0.09823999999980515},{"name":"encodeBackslashEscapes","time":0.1198171499999944,"maxTime":0.8715069999998377,"minTime":0.07292699999970864},{"name":"encodeCode","time":0.982675499999982,"maxTime":1.8424599999998463,"minTime":0.8727119999998649},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.3008235499999728,"maxTime":0.3890440000000126,"minTime":0.2772429999999986},{"name":"githubCodeBlocks","time":0.20439130000002023,"maxTime":0.8889859999999317,"minTime":0.1461549999999079},{"name":"hashBlock","time":0.06328369999998813,"maxTime":0.4149600000000646,"minTime":0.034957000000304106},{"name":"hashElement","time":0.0017929999999978462,"maxTime":0.031942999999955646,"minTime":0},{"name":"hashHTMLSpans","time":4.130528449999997,"maxTime":4.411176999999952,"minTime":3.987779000000046},{"name":"hashPreCodeTags","time":0.26229599999996933,"maxTime":2.428888999999799,"minTime":0.10848600000008446},{"name":"headers","time":1.263836200000037,"maxTime":4.308414999999968,"minTime":0.9534750000002532},{"name":"horizontalRule","time":0.2299157000000605,"maxTime":0.33088400000042384,"minTime":0.19376899999997477},{"name":"images","time":0.18361319999996795,"maxTime":0.5638280000002851,"minTime":0.13379999999961},{"name":"italicsAndBold","time":0.31194355000000085,"maxTime":0.8284139999996114,"minTime":0.25132699999994657},{"name":"lists","time":2.641733750000003,"maxTime":3.2741790000000037,"minTime":2.4511889999998857},{"name":"outdent","time":0.1594599499999731,"maxTime":0.2401769999996759,"minTime":0.14404600000034407},{"name":"paragraphs","time":6.723880100000019,"maxTime":12.671812000000045,"minTime":5.367362999999841},{"name":"spanGamut","time":4.990629550000063,"maxTime":9.206274000000121,"minTime":4.172807000000375},{"name":"strikethrough","time":0.0031943499999670167,"maxTime":0.0581609999999273,"minTime":0},{"name":"stripLinkDefinitions","time":0.245947799999999,"maxTime":0.38994800000000396,"minTime":0.21908299999995506},{"name":"tables","time":0.0024710999999797423,"maxTime":0.043695999999727064,"minTime":0},{"name":"unescapeSpecialChars","time":0.010472100000015416,"maxTime":0.05092800000011266,"minTime":0.006930999999894993}]}],"1.7.5":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.5624536399999989,"maxTime":14.434112000000027,"minTime":0.1175269999999955},{"name":"performance.testfile.md","time":30.396062639999997,"maxTime":57.88561900000002,"minTime":26.627980999999863}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.279682000000003,"maxTime":8.3917220000003,"minTime":2.3574690000000373},{"name":"anchors","time":0.6018129999999928,"maxTime":5.340845000000172,"minTime":0.2853789999999208},{"name":"autoLinks","time":0.09221340000001418,"maxTime":0.19316600000001927,"minTime":0.06478999999990265},{"name":"blockQuotes","time":2.0676297999999633,"maxTime":4.429558999999699,"minTime":1.7363850000001548},{"name":"codeBlocks","time":0.2791716500000575,"maxTime":0.9365990000001148,"minTime":0.18141300000024785},{"name":"codeSpans","time":0.22182445000000825,"maxTime":0.5915520000003198,"minTime":0.1576060000002144},{"name":"detab","time":0.12001294999997754,"maxTime":0.14494999999988067,"minTime":0.09130899999991016},{"name":"encodeAmpsAndAngles","time":0.1162462000000005,"maxTime":0.22179400000004534,"minTime":0.09643299999970623},{"name":"encodeBackslashEscapes","time":0.13970635000002857,"maxTime":0.9139979999999923,"minTime":0.07111899999972593},{"name":"encodeCode","time":1.1949925000000348,"maxTime":2.009107000000313,"minTime":0.8612610000000132},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.30746834999999917,"maxTime":0.46829899999966074,"minTime":0.2691060000001926},{"name":"githubCodeBlocks","time":0.19697799999999005,"maxTime":0.8374539999999797,"minTime":0.14404599999988932},{"name":"hashBlock","time":0.059848400000032595,"maxTime":0.4420820000000276,"minTime":0.03616199999987657},{"name":"hashElement","time":0.00222985000002609,"maxTime":0.0406820000002881,"minTime":0},{"name":"hashHTMLSpans","time":4.289491099999987,"maxTime":4.712226999999984,"minTime":4.001941999999872},{"name":"hashPreCodeTags","time":0.28119055000001936,"maxTime":2.4391359999999622,"minTime":0.10758299999997689},{"name":"headers","time":1.2212554000000182,"maxTime":4.602836000000025,"minTime":0.9082720000001245},{"name":"horizontalRule","time":0.20826354999994692,"maxTime":0.3522789999997258,"minTime":0.19316600000001927},{"name":"images","time":0.1816696500000262,"maxTime":0.6337419999999838,"minTime":0.12807400000019697},{"name":"italicsAndBold","time":0.33532845000006545,"maxTime":1.2762219999999616,"minTime":0.23897100000021965},{"name":"lists","time":3.142624149999983,"maxTime":6.410941999999977,"minTime":2.3930279999999584},{"name":"outdent","time":0.3979791999999634,"maxTime":0.5846209999999701,"minTime":0.15851100000008955},{"name":"paragraphs","time":5.925721800000019,"maxTime":11.595988000000034,"minTime":4.961444000000029},{"name":"spanGamut","time":4.442833449999966,"maxTime":6.011651999999685,"minTime":4.023940000000039},{"name":"strikethrough","time":0.00299849999998969,"maxTime":0.054544999999961874,"minTime":0},{"name":"stripLinkDefinitions","time":0.24257244999998875,"maxTime":0.42400099999986196,"minTime":0.21486400000003414},{"name":"tables","time":0.0026519000000007507,"maxTime":0.04851700000017445,"minTime":0},{"name":"unescapeSpecialChars","time":0.00845289999997476,"maxTime":0.04098400000020774,"minTime":0.006327999999939493}]}],"1.7.4":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.9721513400000095,"maxTime":25.185683999999924,"minTime":0.16001700000003893},{"name":"performance.testfile.md","time":30.397026539999985,"maxTime":61.91279899999995,"minTime":26.54959800000006}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":3.9990743000000064,"maxTime":6.602594000000408,"minTime":2.3143739999995887},{"name":"anchors","time":0.5273032499999545,"maxTime":3.822632999999769,"minTime":0.2850779999998849},{"name":"autoLinks","time":0.08963684999998804,"maxTime":0.18834400000014284,"minTime":0.06328400000029433},{"name":"blockQuotes","time":2.05724574999997,"maxTime":4.121875000000273,"minTime":1.7803800000001502},{"name":"codeBlocks","time":0.24737865000001874,"maxTime":1.0845610000001216,"minTime":0.18623500000012427},{"name":"codeSpans","time":0.26315439999996215,"maxTime":1.0170579999999063,"minTime":0.16182500000013533},{"name":"detab","time":0.1229059499999721,"maxTime":0.1579079999996793,"minTime":0.0970340000003489},{"name":"encodeAmpsAndAngles","time":0.11849099999999453,"maxTime":0.17116699999996854,"minTime":0.09613099999978658},{"name":"encodeBackslashEscapes","time":0.07934549999995397,"maxTime":0.14645599999994374,"minTime":0.07111799999984214},{"name":"encodeCode","time":0.9450961000000007,"maxTime":1.4528110000001107,"minTime":0.8663830000000416},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.2850024500000245,"maxTime":0.4384650000001784,"minTime":0.245600000000195},{"name":"githubCodeBlocks","time":0.22539534999998523,"maxTime":0.9688430000001063,"minTime":0.1416349999999511},{"name":"hashBlock","time":0.06790930000001935,"maxTime":0.5767860000000837,"minTime":0.03555899999992107},{"name":"hashElement","time":0.0022601500000064335,"maxTime":0.04068300000017189,"minTime":0},{"name":"hashHTMLSpans","time":4.125777100000005,"maxTime":4.527794000000085,"minTime":3.95040599999993},{"name":"hashPreCodeTags","time":0.14892740000002505,"maxTime":0.5373079999999391,"minTime":0.10969100000011167},{"name":"headers","time":1.1714858000000277,"maxTime":3.876875999999811,"minTime":0.8841630000001715},{"name":"horizontalRule","time":0.3806509500000175,"maxTime":3.456793000000289,"minTime":0.1967819999999847},{"name":"images","time":0.19467249999997877,"maxTime":0.6180699999999888,"minTime":0.132593999999699},{"name":"italicsAndBold","time":0.2980658500000118,"maxTime":0.5623199999999997,"minTime":0.24499800000012328},{"name":"lists","time":3.7902082000000066,"maxTime":6.13881500000025,"minTime":2.612108000000262},{"name":"outdent","time":0.16693305000001146,"maxTime":0.2763379999996687,"minTime":0.13892200000009325},{"name":"paragraphs","time":5.349426699999981,"maxTime":6.076133999999911,"minTime":4.8972499999999854},{"name":"spanGamut","time":4.370021999999949,"maxTime":6.111091000000215,"minTime":3.9455849999999373},{"name":"strikethrough","time":0.002681949999941935,"maxTime":0.048215999999683845,"minTime":0},{"name":"stripLinkDefinitions","time":0.2550632000000178,"maxTime":0.400796000000355,"minTime":0.21817700000019613},{"name":"tables","time":0.001913599999966209,"maxTime":0.03284799999983079,"minTime":0},{"name":"unescapeSpecialChars","time":0.008859800000004725,"maxTime":0.04008000000021639,"minTime":0.006630000000313885}]}],"1.7.3":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.2769780200000014,"maxTime":5.742551000000049,"minTime":0.08799399999998059},{"name":"performance.testfile.md","time":30.73344694000001,"maxTime":54.768493000000035,"minTime":26.97154599999999}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.315576899999996,"maxTime":8.270586999999978,"minTime":2.3387870000001385},{"name":"anchors","time":0.5248635000000377,"maxTime":3.812093999999888,"minTime":0.28809199999977864},{"name":"autoLinks","time":0.0845591499999955,"maxTime":0.21998700000040117,"minTime":0.06268099999988408},{"name":"blockQuotes","time":2.032795400000032,"maxTime":3.6222429999997985,"minTime":1.7451259999998001},{"name":"codeBlocks","time":0.25076970000002347,"maxTime":1.059552000000167,"minTime":0.17809899999974732},{"name":"codeSpans","time":0.24638479999996435,"maxTime":0.7494609999998829,"minTime":0.1570040000001427},{"name":"detab","time":0.1421171499999673,"maxTime":0.7524739999998928,"minTime":0.08739100000002509},{"name":"encodeAmpsAndAngles","time":0.10028979999999592,"maxTime":0.12927999999965323,"minTime":0.09492600000021412},{"name":"encodeBackslashEscapes","time":0.07875814999997602,"maxTime":0.1247600000001512,"minTime":0.06991299999981493},{"name":"encodeCode","time":0.9767702500000042,"maxTime":1.773754000000281,"minTime":0.8516189999995731},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.27073390000000475,"maxTime":0.4414790000000721,"minTime":0.24409500000001572},{"name":"githubCodeBlocks","time":0.23499365000002398,"maxTime":0.9848159999996824,"minTime":0.1392240000000129},{"name":"hashBlock","time":0.0681052000000136,"maxTime":0.5496650000000045,"minTime":0.03616199999987657},{"name":"hashElement","time":0.001687549999996918,"maxTime":0.029532000000017433,"minTime":0},{"name":"hashHTMLSpans","time":4.197401899999977,"maxTime":4.563965999999709,"minTime":4.005560999999943},{"name":"hashPreCodeTags","time":0.13869685000001936,"maxTime":0.5433360000001812,"minTime":0.10577400000011039},{"name":"headers","time":1.148419750000039,"maxTime":4.214097000000038,"minTime":0.8796440000000985},{"name":"horizontalRule","time":0.21377854999998364,"maxTime":0.27302400000007765,"minTime":0.1985909999998512},{"name":"images","time":0.3095482500000116,"maxTime":3.095480999999836,"minTime":0.11993800000027477},{"name":"italicsAndBold","time":0.2785843000000341,"maxTime":0.3778940000001967,"minTime":0.23505399999976362},{"name":"lists","time":3.8429223499999354,"maxTime":8.277819999999792,"minTime":2.629892999999811},{"name":"outdent","time":0.19257850000001325,"maxTime":0.3863329999999223,"minTime":0.14404500000000553},{"name":"paragraphs","time":5.540976899999987,"maxTime":8.153060000000096,"minTime":4.83608600000025},{"name":"spanGamut","time":4.637932300000012,"maxTime":5.775095999999849,"minTime":4.142072999999982},{"name":"strikethrough","time":0.0028779499999927794,"maxTime":0.051530999999613414,"minTime":0},{"name":"stripLinkDefinitions","time":0.16675279999994927,"maxTime":0.27483299999994415,"minTime":0.1416349999999511},{"name":"tables","time":0.0021245000000135405,"maxTime":0.03646299999991243,"minTime":0},{"name":"unescapeSpecialChars","time":0.009130949999985205,"maxTime":0.031942999999955646,"minTime":0.00783499999988635}]}],"1.7.2":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.2924792600000001,"maxTime":5.779913000000079,"minTime":0.0870909999999867},{"name":"performance.testfile.md","time":30.395544379999997,"maxTime":53.85987,"minTime":26.054209000000128}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.303097000000003,"maxTime":7.7980609999999615,"minTime":2.377357999999731},{"name":"anchors","time":0.3474425999999994,"maxTime":0.6473019999998542,"minTime":0.28688599999986764},{"name":"autoLinks","time":0.08811514999999873,"maxTime":0.16544199999998455,"minTime":0.06328399999983958},{"name":"blockQuotes","time":2.1012153500000297,"maxTime":5.12055700000019,"minTime":1.7381930000001375},{"name":"codeBlocks","time":0.23850445000000492,"maxTime":0.8784390000000712,"minTime":0.18412599999965096},{"name":"codeSpans","time":0.2522458500000312,"maxTime":0.6283170000001519,"minTime":0.16031900000007226},{"name":"detab","time":0.09415714999997818,"maxTime":0.12867700000015247,"minTime":0.08769299999994473},{"name":"encodeAmpsAndAngles","time":0.1305904000000055,"maxTime":0.7331880000001547,"minTime":0.09251499999982116},{"name":"encodeBackslashEscapes","time":0.07973749999998744,"maxTime":0.1157189999998991,"minTime":0.07021500000018932},{"name":"encodeCode","time":0.9388443000000052,"maxTime":1.4799349999998412,"minTime":0.8573440000000119},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.28453565000002073,"maxTime":0.4731209999999919,"minTime":0.24349200000006022},{"name":"githubCodeBlocks","time":0.2144414500000039,"maxTime":1.046893000000182,"minTime":0.13952599999993254},{"name":"hashBlock","time":0.06795475000005809,"maxTime":0.5532809999999699,"minTime":0.03616200000033132},{"name":"hashElement","time":0.0016724999999723877,"maxTime":0.029833999999937078,"minTime":0},{"name":"hashHTMLSpans","time":4.323498449999988,"maxTime":6.161724999999933,"minTime":4.0037499999998545},{"name":"hashPreCodeTags","time":0.1474811499999987,"maxTime":0.5584039999998822,"minTime":0.1087880000000041},{"name":"headers","time":1.1759319999999889,"maxTime":4.491336000000047,"minTime":0.8841640000000552},{"name":"horizontalRule","time":0.21614389999997458,"maxTime":0.2636819999997897,"minTime":0.19316600000001927},{"name":"images","time":0.15570804999995289,"maxTime":0.5587049999999181,"minTime":0.11782799999991767},{"name":"italicsAndBold","time":0.3219485000000077,"maxTime":1.012539999999717,"minTime":0.2365599999998267},{"name":"lists","time":2.753399100000024,"maxTime":5.612964000000375,"minTime":2.3276349999996455},{"name":"outdent","time":0.16286519999998744,"maxTime":0.2323420000002443,"minTime":0.1398269999999684},{"name":"paragraphs","time":5.108954950000021,"maxTime":6.168355000000247,"minTime":4.741155999999592},{"name":"spanGamut","time":4.422869150000042,"maxTime":6.14906800000017,"minTime":4.000737000000299},{"name":"strikethrough","time":0.0028779999999869687,"maxTime":0.051230000000032305,"minTime":0},{"name":"stripLinkDefinitions","time":0.1603637499999877,"maxTime":0.2257119999999304,"minTime":0.14193599999998696},{"name":"tables","time":0.002470999999968626,"maxTime":0.04339399999980742,"minTime":0},{"name":"unescapeSpecialChars","time":0.011074649999977737,"maxTime":0.04640800000015588,"minTime":0.006628999999975349}]}],"1.7.1":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":1.0738219599999979,"maxTime":20.566299000000072,"minTime":0.3242529999999988},{"name":"performance.testfile.md","time":30.4629232,"maxTime":82.115725,"minTime":26.02165500000001}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.232850950000011,"maxTime":9.06222600000001,"minTime":2.35927700000002},{"name":"anchors","time":0.35050129999999624,"maxTime":0.7627189999998336,"minTime":0.28568100000029517},{"name":"autoLinks","time":0.08923019999999723,"maxTime":0.19015300000000934,"minTime":0.06509199999982229},{"name":"blockQuotes","time":2.073701349999965,"maxTime":4.988563999999769,"minTime":1.7291510000000017},{"name":"codeBlocks","time":0.2560277500000211,"maxTime":0.9369000000001506,"minTime":0.1790019999998549},{"name":"codeSpans","time":0.24160820000001876,"maxTime":0.8386599999998907,"minTime":0.1576060000002144},{"name":"detab","time":0.09915939999998499,"maxTime":0.16815399999995861,"minTime":0.08618599999999788},{"name":"encodeAmpsAndAngles","time":0.13123839999998382,"maxTime":0.646096999999827,"minTime":0.09311699999989287},{"name":"encodeBackslashEscapes","time":0.07607604999996057,"maxTime":0.1404299999999239,"minTime":0.07021399999985078},{"name":"encodeCode","time":0.9938553500000807,"maxTime":1.7056470000002264,"minTime":0.8648769999999786},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.26711740000000644,"maxTime":0.37518199999976787,"minTime":0.24951800000008006},{"name":"githubCodeBlocks","time":0.19164420000001883,"maxTime":0.9664330000000518,"minTime":0.14012899999988804},{"name":"hashBlock","time":0.05914020000000164,"maxTime":0.39748199999985445,"minTime":0.03646299999991243},{"name":"hashElement","time":0.0017327499999964858,"maxTime":0.030737999999928434,"minTime":0},{"name":"hashHTMLSpans","time":4.116996499999937,"maxTime":5.5849379999999655,"minTime":3.89044100000001},{"name":"hashPreCodeTags","time":0.1423884499999531,"maxTime":0.5294739999999365,"minTime":0.1081850000000486},{"name":"headers","time":1.1452692999999954,"maxTime":4.103494999999839,"minTime":0.8639729999999872},{"name":"horizontalRule","time":0.21682209999996757,"maxTime":0.36583999999993466,"minTime":0.19407000000001062},{"name":"images","time":0.15055509999997413,"maxTime":0.5526780000000144,"minTime":0.11662299999989045},{"name":"italicsAndBold","time":0.3119285999999647,"maxTime":1.2412650000001122,"minTime":0.23625899999979083},{"name":"lists","time":4.022899600000005,"maxTime":7.077227000000221,"minTime":2.4975970000000416},{"name":"outdent","time":0.17451229999999213,"maxTime":0.26066899999977977,"minTime":0.14826499999981024},{"name":"paragraphs","time":6.5566433999999845,"maxTime":8.645457999999962,"minTime":4.997002000000066},{"name":"spanGamut","time":5.072655700000018,"maxTime":6.34705299999996,"minTime":4.136643999999706},{"name":"strikethrough","time":0.006192800000076204,"maxTime":0.11029400000006717,"minTime":0},{"name":"stripLinkDefinitions","time":0.16428144999997585,"maxTime":0.27694100000007893,"minTime":0.1416349999999511},{"name":"tables","time":0.004354600000010578,"maxTime":0.08015999999997803,"minTime":0},{"name":"unescapeSpecialChars","time":0.009130899999991015,"maxTime":0.04580600000008417,"minTime":0.006930999999894993}]}],"1.7.0":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.39255787999999486,"maxTime":9.953321000000074,"minTime":0.09673299999997198},{"name":"performance.testfile.md","time":29.416470079999975,"maxTime":54.25341800000001,"minTime":25.948727999999846}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.0619999999999665,"maxTime":7.184810000000198,"minTime":2.325826999999663},{"name":"anchors","time":0.4883242500000051,"maxTime":4.085716999999931,"minTime":0.28085900000041875},{"name":"autoLinks","time":0.08583980000000793,"maxTime":0.19979499999999462,"minTime":0.06298299999980372},{"name":"blockQuotes","time":2.071019450000017,"maxTime":4.554016000000047,"minTime":1.7333710000002611},{"name":"codeBlocks","time":0.2531195000000025,"maxTime":0.8639729999999872,"minTime":0.17809799999986353},{"name":"codeSpans","time":0.2609549000000243,"maxTime":0.5924559999998564,"minTime":0.15971599999966202},{"name":"detab","time":0.09453374999998232,"maxTime":0.1298820000001797,"minTime":0.08859699999993609},{"name":"encodeAmpsAndAngles","time":0.10304694999997537,"maxTime":0.19196099999999205,"minTime":0.09462400000029447},{"name":"encodeBackslashEscapes","time":0.1064521499999728,"maxTime":0.5894419999999627,"minTime":0.07051600000022518},{"name":"encodeCode","time":0.9265486000000009,"maxTime":1.1821999999997388,"minTime":0.8347420000000056},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.2759772000000112,"maxTime":0.6171669999998812,"minTime":0.24530000000004293},{"name":"githubCodeBlocks","time":0.1951549499999828,"maxTime":0.9799929999999222,"minTime":0.1386210000000574},{"name":"hashBlock","time":0.062304449999965074,"maxTime":0.4833670000002712,"minTime":0.03495699999984936},{"name":"hashElement","time":0.0014464500000030966,"maxTime":0.024711000000024796,"minTime":0},{"name":"hashHTMLSpans","time":4.1203715999999755,"maxTime":4.609765000000152,"minTime":3.8587989999996353},{"name":"hashPreCodeTags","time":0.14734550000000582,"maxTime":0.5351989999999205,"minTime":0.10487000000011903},{"name":"headers","time":1.3076671999999916,"maxTime":4.252966000000015,"minTime":0.8564390000001367},{"name":"horizontalRule","time":0.2203779999999597,"maxTime":0.3742779999997765,"minTime":0.19407000000001062},{"name":"images","time":0.15025354999997945,"maxTime":0.506872000000385,"minTime":0.1163219999998546},{"name":"italicsAndBold","time":0.30579589999997553,"maxTime":0.872110000000248,"minTime":0.24138200000015786},{"name":"lists","time":3.447394599999984,"maxTime":4.893336999999974,"minTime":2.407492000000275},{"name":"outdent","time":0.26698190000001887,"maxTime":0.8684939999998278,"minTime":0.1808109999997214},{"name":"paragraphs","time":5.866655149999997,"maxTime":8.331147999999757,"minTime":4.9695779999997285},{"name":"spanGamut","time":5.038527899999986,"maxTime":7.123635999999806,"minTime":4.11615299999994},{"name":"strikethrough","time":0.003992900000002919,"maxTime":0.07322800000019924,"minTime":0},{"name":"stripLinkDefinitions","time":0.15298084999997172,"maxTime":0.24288900000010472,"minTime":0.13952599999993254},{"name":"tables","time":0.0024410000000443686,"maxTime":0.043695999999727064,"minTime":0},{"name":"unescapeSpecialChars","time":0.008663700000033714,"maxTime":0.0406820000002881,"minTime":0.006628999999975349}]}],"1.6.4":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.37575447999999595,"maxTime":6.3811059999999316,"minTime":0.182617999999934},{"name":"performance.testfile.md","time":33.83478732000001,"maxTime":61.04858100000001,"minTime":30.186325000000124}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":2.5643760500000328,"maxTime":8.346818999999869,"minTime":1.8710879999998724},{"name":"anchors","time":0.4985702000000174,"maxTime":4.221624999999676,"minTime":0.27031199999964883},{"name":"autoLinks","time":0.08000864999996793,"maxTime":0.17357799999990675,"minTime":0.06087299999990137},{"name":"blockQuotes","time":3.3429765499999804,"maxTime":7.305651000000125,"minTime":2.8504790000001776},{"name":"codeBlocks","time":0.22134235000003172,"maxTime":0.8220859999996719,"minTime":0.17176999999992404},{"name":"codeSpans","time":0.22901160000001256,"maxTime":0.7443360000002031,"minTime":0.15579799999977695},{"name":"detab","time":0.0973213499999929,"maxTime":0.15429100000028484,"minTime":0.08618699999988166},{"name":"encodeAmpsAndAngles","time":0.11678870000000643,"maxTime":0.19979600000033315,"minTime":0.09432200000037483},{"name":"encodeBackslashEscapes","time":0.08623155000002498,"maxTime":0.2296289999999317,"minTime":0.06810499999983222},{"name":"encodeCode","time":0.8853238499999861,"maxTime":1.1647219999999834,"minTime":0.8163599999998041},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.2983526000000438,"maxTime":0.4954210000000785,"minTime":0.2401769999996759},{"name":"githubCodeBlocks","time":0.18343240000001515,"maxTime":0.7847170000000006,"minTime":0.1331980000004478},{"name":"hashBlock","time":0.0443587499999694,"maxTime":0.09763799999973344,"minTime":0.035257999999885214},{"name":"hashElement","time":0.00200395000001663,"maxTime":0.03345000000035725,"minTime":0},{"name":"hashHTMLSpans","time":4.199521549999963,"maxTime":4.551605000000109,"minTime":3.9874759999997877},{"name":"hashPreCodeTags","time":0.1295205500000293,"maxTime":0.3134050000003299,"minTime":0.10637700000006589},{"name":"headers","time":1.2236204000000044,"maxTime":4.009776000000329,"minTime":0.944735000000037},{"name":"horizontalRule","time":0.41190154999999323,"maxTime":4.175217999999859,"minTime":0.19648000000006505},{"name":"images","time":0.08806979999997111,"maxTime":0.20250800000030722,"minTime":0.0732279999997445},{"name":"italicsAndBold","time":0.2764291999999841,"maxTime":0.4137550000000374,"minTime":0.23324500000035187},{"name":"lists","time":5.0047764500000085,"maxTime":6.109288000000106,"minTime":4.663406000000123},{"name":"outdent","time":0.1521370000000161,"maxTime":0.3366089999999531,"minTime":0.13922500000035143},{"name":"paragraphs","time":5.336081549999994,"maxTime":7.117005000000063,"minTime":4.843312999999853},{"name":"spanGamut","time":4.449883849999901,"maxTime":6.152983999999833,"minTime":3.8569910000001073},{"name":"strikethrough","time":0.002606700000001183,"maxTime":0.04881900000009409,"minTime":0},{"name":"stripLinkDefinitions","time":0.18040370000001077,"maxTime":0.3161169999998492,"minTime":0.14705999999978303},{"name":"tables","time":0.0031190500000320754,"maxTime":0.05544899999995323,"minTime":0},{"name":"unescapeSpecialChars","time":0.009281650000002629,"maxTime":0.047313000000031025,"minTime":0.006628999999975349}]}],"1.6.3":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.3880986600000119,"maxTime":6.064399999999978,"minTime":0.17418099999997594},{"name":"performance.testfile.md","time":26.898552680000012,"maxTime":49.06275100000005,"minTime":24.84523399999989}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":2.6158222500000194,"maxTime":8.18079200000011,"minTime":1.8985149999998612},{"name":"anchors","time":0.5154769000000442,"maxTime":4.690839000000324,"minTime":0.2639840000001641},{"name":"autoLinks","time":0.09307249999999385,"maxTime":0.18834400000014284,"minTime":0.07262600000012753},{"name":"blockQuotes","time":4.5183903999999755,"maxTime":8.952854000000116,"minTime":3.035816000000068},{"name":"codeBlocks","time":0.22262349999998604,"maxTime":0.347758999999769,"minTime":0.18834500000002663},{"name":"codeSpans","time":0.31763950000004115,"maxTime":1.0948100000000522,"minTime":0.1771950000002107},{"name":"detab","time":0.0919273999999632,"maxTime":0.13651200000003882,"minTime":0.08739199999990888},{"name":"encodeAmpsAndAngles","time":0.0438916999999492,"maxTime":0.08919999999989159,"minTime":0.038271000000349886},{"name":"encodeBackslashEscapes","time":0.10785369999998692,"maxTime":0.2651890000001913,"minTime":0.07835100000011153},{"name":"encodeCode","time":1.5346329500000138,"maxTime":9.895783999999821,"minTime":0.8645779999997103},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.2937122499999759,"maxTime":0.5234480000003714,"minTime":0.25343700000030367},{"name":"githubCodeBlocks","time":0.20775164999997742,"maxTime":0.7901440000000548,"minTime":0.1416349999999511},{"name":"hashBlock","time":0.042234400000006646,"maxTime":0.12325299999974959,"minTime":0.035860999999840715},{"name":"hashElement","time":0.0016724999999951252,"maxTime":0.028929000000061933,"minTime":0},{"name":"hashHTMLSpans","time":0.4103353000000197,"maxTime":1.5980680000002394,"minTime":0.2404790000000503},{"name":"hashPreCodeTags","time":0.13196184999997057,"maxTime":0.3950719999998,"minTime":0.11029400000006717},{"name":"headers","time":1.0150126000000683,"maxTime":1.501936999999998,"minTime":0.8055130000002464},{"name":"horizontalRule","time":0.22018260000002102,"maxTime":0.35710100000005696,"minTime":0.1946739999998499},{"name":"images","time":0.1582398000000012,"maxTime":0.978186999999707,"minTime":0.07684500000004846},{"name":"italicsAndBold","time":0.28757974999998626,"maxTime":0.6394679999998516,"minTime":0.24078000000008615},{"name":"lists","time":5.151319100000023,"maxTime":6.331397000000379,"minTime":4.629061999999976},{"name":"outdent","time":0.18019314999994548,"maxTime":0.36342999999988024,"minTime":0.14253999999982625},{"name":"paragraphs","time":4.547636500000022,"maxTime":6.308794999999918,"minTime":4.002250999999887},{"name":"spanGamut","time":1.5190982500000245,"maxTime":1.863557999999557,"minTime":1.3720530000000508},{"name":"strikethrough","time":0.003450399999996989,"maxTime":0.06539299999985815,"minTime":0},{"name":"stripLinkDefinitions","time":0.1786111499999606,"maxTime":0.3128030000002582,"minTime":0.1443480000002637},{"name":"tables","time":0.0035106999999925392,"maxTime":0.06268099999988408,"minTime":0.00030099999958110857},{"name":"unescapeSpecialChars","time":0.01146649999998317,"maxTime":0.04881900000009409,"minTime":0.006628999999975349}]}],"1.6.2":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.6130621400000001,"maxTime":5.893518999999998,"minTime":0.16875699999999938},{"name":"performance.testfile.md","time":25.970254839999992,"maxTime":62.88168,"minTime":23.709682999999927}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":2.6685977000000323,"maxTime":8.478507000000036,"minTime":1.8846490000000813},{"name":"anchors","time":0.5002727000000278,"maxTime":3.841318999999885,"minTime":0.2676000000001295},{"name":"autoLinks","time":0.09846654999997781,"maxTime":0.21064500000011321,"minTime":0.07202299999994466},{"name":"blockQuotes","time":3.221817550000014,"maxTime":5.825714999999946,"minTime":2.791112000000112},{"name":"codeBlocks","time":0.17663659999998343,"maxTime":0.3712639999998828,"minTime":0.1570040000001427},{"name":"codeSpans","time":0.2181328999999778,"maxTime":0.483066000000008,"minTime":0.15097700000001169},{"name":"detab","time":0.13492999999998573,"maxTime":0.6545340000000124,"minTime":0.08498099999997066},{"name":"encodeAmpsAndAngles","time":0.04158639999994875,"maxTime":0.11752699999988181,"minTime":0.03616199999987657},{"name":"encodeBackslashEscapes","time":0.0800689000000034,"maxTime":0.13319799999999304,"minTime":0.06780399999979636},{"name":"encodeCode","time":0.5599700499999927,"maxTime":0.9821019999999407,"minTime":0.48396900000011556},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.35280645000001415,"maxTime":0.5683480000000145,"minTime":0.2914060000000518},{"name":"githubCodeBlocks","time":0.17996669999999995,"maxTime":0.7729650000001129,"minTime":0.1274710000000141},{"name":"hashBlock","time":0.057723849999990764,"maxTime":0.31159699999989243,"minTime":0.037368000000014945},{"name":"hashElement","time":0.0025463500000000748,"maxTime":0.04610600000000886,"minTime":0},{"name":"hashHTMLSpans","time":0.47458235000001425,"maxTime":2.325223000000051,"minTime":0.2344510000000355},{"name":"hashPreCodeTags","time":0.12186629999998785,"maxTime":0.3073779999999715,"minTime":0.10697999999979402},{"name":"headers","time":0.8577350000000024,"maxTime":0.9540770000000975,"minTime":0.7801970000000438},{"name":"horizontalRule","time":0.22663095000001476,"maxTime":0.41797300000007453,"minTime":0.1967819999999847},{"name":"images","time":0.17053435000000264,"maxTime":1.4528119999999944,"minTime":0.07714599999985694},{"name":"italicsAndBold","time":0.10093754999998054,"maxTime":0.20220699999981662,"minTime":0.0882960000001276},{"name":"lists","time":4.9306124000000064,"maxTime":5.460477999999966,"minTime":4.55642499999999},{"name":"outdent","time":0.16260889999998654,"maxTime":0.31461000000012973,"minTime":0.1416349999999511},{"name":"paragraphs","time":3.7896679000000177,"maxTime":5.563840999999911,"minTime":3.278396000000157},{"name":"spanGamut","time":1.4417527499999891,"maxTime":2.0124210000001312,"minTime":1.2032939999999144},{"name":"strikethrough","time":0.004233999999985372,"maxTime":0.08196800000018811,"minTime":0},{"name":"stripBlankLines","time":0.08623144999999113,"maxTime":0.1304850000001352,"minTime":0.0804600000001301},{"name":"stripLinkDefinitions","time":0.15983660000002828,"maxTime":0.21727400000008856,"minTime":0.1446480000001884},{"name":"tables","time":0.004143600000008974,"maxTime":0.07593999999994594,"minTime":0},{"name":"unescapeSpecialChars","time":0.00991439999999102,"maxTime":0.0581609999999273,"minTime":0.006628999999975349}]}],"1.6.1":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.3172682400000001,"maxTime":5.4981469999999995,"minTime":0.16062000000000154},{"name":"readme.md","time":26.0144148,"maxTime":46.79858399999999,"minTime":24.245484999999917}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":2.6414157500000215,"maxTime":7.791727999999921,"minTime":1.9364810000001853},{"name":"anchors","time":0.47462755000000245,"maxTime":4.062812000000122,"minTime":0.25885999999991327},{"name":"autoLinks","time":0.08906409999998459,"maxTime":0.19708299999979317,"minTime":0.06870800000001509},{"name":"blockQuotes","time":3.213485000000014,"maxTime":6.05383699999993,"minTime":2.880010000000084},{"name":"codeBlocks","time":0.16200620000001892,"maxTime":0.2691060000001926,"minTime":0.15308599999980288},{"name":"codeSpans","time":0.169494799999984,"maxTime":0.39868699999988166,"minTime":0.1410319999999956},{"name":"detab","time":0.12471390000000611,"maxTime":0.6647800000000643,"minTime":0.08558400000015354},{"name":"encodeAmpsAndAngles","time":0.04181244999999763,"maxTime":0.08920000000011896,"minTime":0.03796999999985928},{"name":"encodeBackslashEscapes","time":0.07586505000000443,"maxTime":0.13289599999984603,"minTime":0.06810500000005959},{"name":"encodeCode","time":0.5765897500000051,"maxTime":0.970348999999942,"minTime":0.4791480000001229},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.24603789999998754,"maxTime":0.35047099999997045,"minTime":0.22119199999997363},{"name":"githubCodeBlocks","time":0.1767573999999968,"maxTime":0.815454999999929,"minTime":0.1250600000000759},{"name":"hashBlock","time":0.06537804999999253,"maxTime":0.42972599999984595,"minTime":0.0376690000000508},{"name":"hashElement","time":0.0020039500000052614,"maxTime":0.034051999999974214,"minTime":0},{"name":"hashHTMLSpans","time":0.42437735000000887,"maxTime":2.3210050000000138,"minTime":0.24078000000008615},{"name":"hashPreCodeTags","time":0.12225794999998243,"maxTime":0.23836899999992056,"minTime":0.10396600000012768},{"name":"headers","time":0.8037480999999957,"maxTime":0.9462419999999838,"minTime":0.7256529999999657},{"name":"horizontalRule","time":0.2186149999999884,"maxTime":0.27362700000003315,"minTime":0.19437100000004648},{"name":"images","time":0.12388539999997192,"maxTime":0.9019430000000739,"minTime":0.07081799999991745},{"name":"italicsAndBold","time":0.10089220000002115,"maxTime":0.15037400000005618,"minTime":0.08950099999992744},{"name":"lists","time":4.938929699999983,"maxTime":5.421000999999933,"minTime":4.623625999999831},{"name":"outdent","time":0.1648239000000217,"maxTime":0.3372110000000248,"minTime":0.1404290000000401},{"name":"paragraphs","time":3.4947812,"maxTime":4.554917999999816,"minTime":3.1714170000000195},{"name":"spanGamut","time":1.318997649999983,"maxTime":1.9916279999999915,"minTime":1.1469409999999698},{"name":"strikethrough","time":0.007458499999995638,"maxTime":0.14314200000012534,"minTime":0},{"name":"stripBlankLines","time":0.09447364999999763,"maxTime":0.1545929999999771,"minTime":0.0822689999999966},{"name":"stripLinkDefinitions","time":0.1762751000000094,"maxTime":0.3112949999999728,"minTime":0.1464570000000549},{"name":"tables","time":0.0023505499999828317,"maxTime":0.03947699999980614,"minTime":0},{"name":"unescapeSpecialChars","time":0.008332400000006146,"maxTime":0.03375200000004952,"minTime":0.0066299999998591375}]}],"1.6.0":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.3075345600000001,"maxTime":5.369168,"minTime":0.1570040000000006},{"name":"readme.md","time":25.81825956,"maxTime":47.795452,"minTime":23.775378000000046}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":2.652987649999966,"maxTime":8.557761999999911,"minTime":1.8804290000000492},{"name":"anchors","time":0.5166509500000303,"maxTime":4.142066999999997,"minTime":0.27121600000009494},{"name":"autoLinks","time":0.0885518999999931,"maxTime":0.19437100000004648,"minTime":0.0705159999999978},{"name":"blockGamut","time":17.371581599999978,"maxTime":22.94093699999985,"minTime":14.081522999999834},{"name":"blockQuotes","time":3.011308699999995,"maxTime":4.110426000000189,"minTime":2.7742359999999735},{"name":"codeBlocks","time":0.24291900000000624,"maxTime":0.8344409999999698,"minTime":0.19346700000005512},{"name":"codeSpans","time":0.2271433000000002,"maxTime":0.4583549999999832,"minTime":0.19135800000003655},{"name":"detab","time":0.09469964999999547,"maxTime":0.13289599999984603,"minTime":0.08950099999992744},{"name":"encodeAmpsAndAngles","time":0.040486450000014426,"maxTime":0.07262600000012753,"minTime":0.03766799999993964},{"name":"encodeBackslashEscapes","time":0.09959649999997282,"maxTime":0.5095850000000155,"minTime":0.06840699999997923},{"name":"encodeCode","time":0.5320952499999863,"maxTime":0.7057630000001609,"minTime":0.4794489999999314},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.38607564999999794,"maxTime":0.7018459999999322,"minTime":0.326663999999937},{"name":"githubCodeBlocks","time":0.21441115000002356,"maxTime":0.7780880000000252,"minTime":0.15579800000000432},{"name":"hashBlock","time":0.056638900000007195,"maxTime":0.27995499999997264,"minTime":0.035257999999885214},{"name":"hashElement","time":0.001958799999999883,"maxTime":0.033148999999866646,"minTime":0},{"name":"hashHTMLSpans","time":0.38414695000003574,"maxTime":1.9973540000000867,"minTime":0.2356569999999465},{"name":"hashPreCodeTags","time":0.1327451500000393,"maxTime":0.20009700000014163,"minTime":0.1157189999998991},{"name":"headers","time":0.9440720999999825,"maxTime":2.4683650000001762,"minTime":0.7823069999999461},{"name":"images","time":0.12035954999996648,"maxTime":0.4857769999998709,"minTime":0.08588499999996202},{"name":"italicsAndBold","time":0.11076150000000098,"maxTime":0.4447930000001179,"minTime":0.08799499999986438},{"name":"lists","time":5.782546349999995,"maxTime":13.248890999999958,"minTime":4.463608999999906},{"name":"outdent","time":0.3057505000000219,"maxTime":0.9561860000001161,"minTime":0.22541000000001077},{"name":"paragraphs","time":6.582542549999971,"maxTime":8.810596000000032,"minTime":4.498867000000246},{"name":"spanGamut","time":2.43690389999997,"maxTime":3.067450000000008,"minTime":1.6474849999999606},{"name":"strikethrough","time":0.005228549999992537,"maxTime":0.10035000000016225,"minTime":0},{"name":"stripBlankLines","time":0.12142940000005638,"maxTime":0.17508399999996982,"minTime":0.09191199999986566},{"name":"stripLinkDefinitions","time":0.24673084999997172,"maxTime":0.572566000000279,"minTime":0.17146900000034293},{"name":"tables","time":0.005650249999962398,"maxTime":0.0985419999997248,"minTime":0.00030099999958110857},{"name":"unescapeSpecialChars","time":0.016694800000050237,"maxTime":0.06569400000034875,"minTime":0.011450999999851774}]}]} \ No newline at end of file +{"2.0.0":[{"suiteName":"Basic","cycles":50,"tests":[{"name":"Simple \"Hello World\"","time":0.5814020752906799,"maxTime":12.278934955596924,"minTime":0.15148591995239258},{"name":"performance.testfile.md","time":35.49076347827911,"maxTime":79.40457594394684,"minTime":29.04559099674225}]},{"suiteName":"subParsers","cycles":20,"tests":[{"name":"hashHTMLBlocks","time":4.561372250318527,"maxTime":7.806509017944336,"minTime":2.461485981941223},{"name":"anchors","time":2.9101044595241548,"maxTime":6.510464072227478,"minTime":1.055580973625183},{"name":"blockQuotes","time":4.141605257987976,"maxTime":19.022807955741882,"minTime":2.540547013282776},{"name":"codeBlocks","time":0.263570636510849,"maxTime":0.8583500385284424,"minTime":0.19387996196746826},{"name":"codeSpans","time":0.3651615560054779,"maxTime":1.4206420183181763,"minTime":0.27775895595550537},{"name":"detab","time":0.054944151639938356,"maxTime":0.11614596843719482,"minTime":0.04707300662994385},{"name":"encodeAmpsAndAngles","time":0.144669109582901,"maxTime":0.796051025390625,"minTime":0.09184098243713379},{"name":"encodeBackslashEscapes","time":0.08684400320053101,"maxTime":0.2664440870285034,"minTime":0.0629270076751709},{"name":"encodeCode","time":0.6048604607582092,"maxTime":1.1443489789962769,"minTime":0.5217140913009644},{"name":"escapeSpecialCharsWithinTagAttributes","time":0.2064647912979126,"maxTime":0.2871870994567871,"minTime":0.1843109130859375},{"name":"githubCodeBlocks","time":0.25113869905471803,"maxTime":1.0032700300216675,"minTime":0.19171404838562012},{"name":"hashBlock","time":0.038335990905761716,"maxTime":0.10441303253173828,"minTime":0.034361958503723145},{"name":"hashElement","time":0.0046201348304748535,"maxTime":0.05286991596221924,"minTime":0.0013968944549560547},{"name":"hashHTMLSpans","time":5.228999066352844,"maxTime":9.835397958755493,"minTime":4.239645004272461},{"name":"hashPreCodeTags","time":0.15527103543281556,"maxTime":0.7053269147872925,"minTime":0.11698400974273682},{"name":"headers","time":2.277534711360931,"maxTime":4.824635028839111,"minTime":1.6311440467834473},{"name":"horizontalRule","time":0.1592068076133728,"maxTime":0.27559399604797363,"minTime":0.14848291873931885},{"name":"images","time":0.15910540223121644,"maxTime":0.3903430700302124,"minTime":0.1241079568862915},{"name":"italicsAndBold","time":0.2797422528266907,"maxTime":0.7730040550231934,"minTime":0.21085107326507568},{"name":"lists","time":4.25269467830658,"maxTime":8.173315048217773,"minTime":3.1456509828567505},{"name":"outdent","time":0.18059219121932985,"maxTime":0.23801898956298828,"minTime":0.16182196140289307},{"name":"paragraphs","time":8.96755729317665,"maxTime":11.331398010253906,"minTime":7.8572129011154175},{"name":"spanGamut","time":2.985103452205658,"maxTime":4.162191033363342,"minTime":2.48593008518219},{"name":"strikethrough","time":0.006921297311782837,"maxTime":0.09889602661132812,"minTime":0.001326918601989746},{"name":"stripLinkDefinitions","time":1.9106478571891785,"maxTime":2.8545520305633545,"minTime":1.446552038192749},{"name":"tables","time":0.008185452222824097,"maxTime":0.12662196159362793,"minTime":0.0015370845794677734},{"name":"unescapeSpecialChars","time":0.013451296091079711,"maxTime":0.07347309589385986,"minTime":0.009706974029541016}]}]} \ No newline at end of file diff --git a/performance.log.md b/performance.log.md index 76b1b76..9ffc1d0 100644 --- a/performance.log.md +++ b/performance.log.md @@ -1,744 +1,43 @@ # Performance Tests for showdown -## [version 2.0.0-alpha1](https://github.com/showdownjs/showdown/tree/2.0.0-alpha1) +## [version 2.0.0](https://github.com/showdownjs/showdown/tree/2.0.0) ### Test Suite: Basic (50 cycles) | test | avgTime | max | min | |:-----|--------:|----:|----:| -|Simple "Hello World"|0.330|9.462|0.086| -|performance.testfile.md|32.210|56.635|27.395| +|Simple "Hello World"|0.581|12.279|0.151| +|performance.testfile.md|35.491|79.405|29.046| ### Test Suite: subParsers (20 cycles) | test | avgTime | max | min | |:-----|--------:|----:|----:| -|hashHTMLBlocks|4.055|7.506|2.413| -|anchors|0.342|0.600|0.286| -|autoLinks|0.091|0.193|0.070| -|blockQuotes|2.896|5.991|1.987| -|codeBlocks|0.303|1.578|0.190| -|codeSpans|0.285|0.533|0.237| -|detab|0.136|0.873|0.086| -|encodeAmpsAndAngles|0.104|0.166|0.097| -|encodeBackslashEscapes|0.081|0.141|0.068| -|encodeCode|0.942|1.342|0.850| -|escapeSpecialCharsWithinTagAttributes|0.212|0.436|0.159| -|githubCodeBlocks|0.176|0.305|0.143| -|hashBlock|0.047|0.094|0.036| -|hashElement|0.003|0.046|0.001| -|hashHTMLSpans|4.276|5.772|3.965| -|hashPreCodeTags|0.144|0.324|0.110| -|headers|1.418|4.438|1.062| -|horizontalRule|0.227|0.403|0.195| -|images|0.175|0.435|0.129| -|italicsAndBold|0.375|2.407|0.228| -|lists|2.918|3.716|2.526| -|outdent|0.164|0.270|0.138| -|paragraphs|6.444|8.106|5.759| -|spanGamut|4.294|6.106|3.842| -|strikethrough|0.005|0.090|0.000| -|stripLinkDefinitions|0.230|0.286|0.221| -|tables|0.002|0.034|0.001| -|unescapeSpecialChars|0.011|0.080|0.007| - - -## [version 1.9.0](https://github.com/showdownjs/showdown/tree/1.9.0) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.476|9.945|0.088| -|performance.testfile.md|32.208|61.885|28.234| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|5.827|23.030|2.429| -|anchors|0.363|0.636|0.294| -|autoLinks|0.120|0.319|0.071| -|blockQuotes|2.884|6.237|2.040| -|codeBlocks|0.290|1.131|0.189| -|codeSpans|0.314|0.875|0.234| -|detab|0.095|0.141|0.086| -|encodeAmpsAndAngles|0.155|1.186|0.095| -|encodeBackslashEscapes|0.087|0.144|0.069| -|encodeCode|0.918|1.279|0.865| -|escapeSpecialCharsWithinTagAttributes|0.245|0.711|0.156| -|githubCodeBlocks|0.160|0.291|0.142| -|hashBlock|0.043|0.067|0.038| -|hashElement|0.003|0.035|0.000| -|hashHTMLSpans|4.273|6.304|3.983| -|hashPreCodeTags|0.133|0.344|0.110| -|headers|1.454|3.874|1.098| -|horizontalRule|0.230|0.300|0.202| -|images|0.191|0.476|0.135| -|italicsAndBold|0.310|0.866|0.236| -|lists|3.135|4.249|2.662| -|outdent|0.167|0.262|0.140| -|paragraphs|6.383|7.885|5.680| -|spanGamut|4.106|5.310|3.698| -|strikethrough|0.005|0.087|0.000| -|stripLinkDefinitions|0.245|0.376|0.221| -|tables|0.003|0.049|0.001| -|unescapeSpecialChars|0.010|0.057|0.007| - - -## [version 1.8.4](https://github.com/showdownjs/showdown/tree/1.8.4) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.736|11.076|0.117| -|performance.testfile.md|32.918|62.427|27.941| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|5.260|17.333|2.340| -|anchors|0.522|2.898|0.307| -|autoLinks|0.124|0.300|0.071| -|blockQuotes|2.244|3.333|2.015| -|codeBlocks|0.244|0.817|0.190| -|codeSpans|0.354|1.201|0.243| -|detab|0.096|0.143|0.088| -|encodeAmpsAndAngles|0.138|0.198|0.096| -|encodeBackslashEscapes|0.093|0.184|0.071| -|encodeCode|0.961|1.611|0.858| -|escapeSpecialCharsWithinTagAttributes|0.252|0.520|0.158| -|githubCodeBlocks|0.262|0.390|0.161| -|hashBlock|0.052|0.129|0.037| -|hashElement|0.003|0.040|0.000| -|hashHTMLSpans|4.240|4.673|4.044| -|hashPreCodeTags|0.134|0.337|0.113| -|headers|1.412|4.475|1.077| -|horizontalRule|0.358|2.686|0.196| -|images|0.184|0.480|0.130| -|italicsAndBold|0.300|0.458|0.234| -|lists|3.074|4.651|2.626| -|outdent|0.204|0.931|0.137| -|paragraphs|6.406|8.020|5.821| -|spanGamut|4.136|6.038|3.840| -|strikethrough|0.007|0.132|0.000| -|stripLinkDefinitions|0.248|0.403|0.217| -|tables|0.003|0.040|0.001| -|unescapeSpecialChars|0.009|0.039|0.007| - - -## [version 1.8.3](https://github.com/showdownjs/showdown/tree/1.8.3) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.927|32.654|0.147| -|performance.testfile.md|32.485|62.282|28.403| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|5.454|18.356|2.385| -|anchors|0.504|3.110|0.290| -|autoLinks|0.114|0.284|0.069| -|blockQuotes|2.269|3.374|1.997| -|codeBlocks|0.250|0.840|0.192| -|codeSpans|0.352|1.231|0.249| -|detab|0.115|0.179|0.087| -|encodeAmpsAndAngles|0.105|0.162|0.095| -|encodeBackslashEscapes|0.108|0.235|0.075| -|encodeCode|0.994|1.915|0.847| -|escapeSpecialCharsWithinTagAttributes|0.237|0.475|0.160| -|githubCodeBlocks|0.202|0.771|0.151| -|hashBlock|0.071|0.493|0.039| -|hashElement|0.002|0.036|0.001| -|hashHTMLSpans|4.162|4.708|3.959| -|hashPreCodeTags|0.130|0.331|0.112| -|headers|1.409|4.622|1.044| -|horizontalRule|0.351|2.655|0.196| -|images|0.199|0.545|0.131| -|italicsAndBold|0.269|0.357|0.235| -|lists|3.057|4.403|2.686| -|outdent|0.153|0.307|0.136| -|paragraphs|6.455|7.901|5.708| -|spanGamut|4.256|5.542|3.930| -|strikethrough|0.005|0.089|0.000| -|stripLinkDefinitions|0.248|0.394|0.225| -|tables|0.002|0.028|0.001| -|unescapeSpecialChars|0.009|0.039|0.007| - - -## [version 1.8.2](https://github.com/showdownjs/showdown/tree/1.8.2) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.361|8.977|0.104| -|performance.testfile.md|33.109|56.478|29.179| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|5.488|20.714|2.321| -|anchors|0.506|3.158|0.292| -|autoLinks|0.141|0.365|0.072| -|blockQuotes|2.300|3.642|2.046| -|codeBlocks|0.243|0.877|0.189| -|codeSpans|0.268|1.176|0.159| -|detab|0.095|0.172|0.089| -|encodeAmpsAndAngles|0.108|0.230|0.097| -|encodeBackslashEscapes|0.078|0.119|0.074| -|encodeCode|1.002|1.544|0.851| -|escapeSpecialCharsWithinTagAttributes|0.256|0.566|0.164| -|githubCodeBlocks|0.253|0.999|0.152| -|hashBlock|0.042|0.080|0.037| -|hashElement|0.002|0.032|0.000| -|hashHTMLSpans|4.444|5.282|3.987| -|hashPreCodeTags|0.152|0.265|0.117| -|headers|1.465|4.970|1.059| -|horizontalRule|0.245|0.562|0.205| -|images|0.312|2.615|0.131| -|italicsAndBold|0.287|0.427|0.244| -|lists|3.261|4.098|2.792| -|outdent|0.179|0.377|0.141| -|paragraphs|6.661|9.047|5.884| -|spanGamut|4.561|6.173|4.009| -|strikethrough|0.005|0.097|0.000| -|stripLinkDefinitions|0.251|0.402|0.216| -|tables|0.006|0.086|0.001| -|unescapeSpecialChars|0.013|0.064|0.008| - - -## [version 1.8.0](https://github.com/showdownjs/showdown/tree/1.8.0) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.357|9.000|0.091| -|performance.testfile.md|31.434|57.439|26.735| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|4.177|7.661|2.346| -|anchors|0.542|3.749|0.300| -|autoLinks|0.087|0.183|0.069| -|blockQuotes|2.049|3.552|1.815| -|codeBlocks|0.264|1.163|0.185| -|codeSpans|0.271|0.790|0.163| -|detab|0.092|0.120|0.086| -|encodeAmpsAndAngles|0.106|0.146|0.097| -|encodeBackslashEscapes|0.091|0.152|0.077| -|encodeCode|0.962|1.552|0.862| -|escapeSpecialCharsWithinTagAttributes|0.239|0.487|0.173| -|githubCodeBlocks|0.222|0.914|0.140| -|hashBlock|0.063|0.402|0.035| -|hashElement|0.001|0.025|0.000| -|hashHTMLSpans|4.303|4.889|4.021| -|hashPreCodeTags|0.164|0.541|0.110| -|headers|1.159|3.779|0.968| -|horizontalRule|0.244|0.419|0.194| -|images|0.324|3.058|0.133| -|italicsAndBold|0.289|0.419|0.237| -|lists|2.671|3.139|2.494| -|outdent|0.159|0.253|0.139| -|paragraphs|5.594|6.833|5.159| -|spanGamut|5.069|9.600|4.128| -|strikethrough|0.003|0.062|0.000| -|stripLinkDefinitions|0.271|0.400|0.225| -|tables|0.002|0.031|0.000| -|unescapeSpecialChars|0.008|0.038|0.007| - - -## [version 1.7.6](https://github.com/showdownjs/showdown/tree/1.7.6) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.313|6.267|0.092| -|performance.testfile.md|30.962|54.583|26.381| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|4.099|7.072|2.360| -|anchors|0.574|4.502|0.294| -|autoLinks|0.087|0.210|0.066| -|blockQuotes|2.176|4.602|1.823| -|codeBlocks|0.282|0.885|0.193| -|codeSpans|0.265|0.764|0.166| -|detab|0.102|0.155|0.091| -|encodeAmpsAndAngles|0.107|0.175|0.098| -|encodeBackslashEscapes|0.120|0.872|0.073| -|encodeCode|0.983|1.842|0.873| -|escapeSpecialCharsWithinTagAttributes|0.301|0.389|0.277| -|githubCodeBlocks|0.204|0.889|0.146| -|hashBlock|0.063|0.415|0.035| -|hashElement|0.002|0.032|0.000| -|hashHTMLSpans|4.131|4.411|3.988| -|hashPreCodeTags|0.262|2.429|0.108| -|headers|1.264|4.308|0.953| -|horizontalRule|0.230|0.331|0.194| -|images|0.184|0.564|0.134| -|italicsAndBold|0.312|0.828|0.251| -|lists|2.642|3.274|2.451| -|outdent|0.159|0.240|0.144| -|paragraphs|6.724|12.672|5.367| -|spanGamut|4.991|9.206|4.173| -|strikethrough|0.003|0.058|0.000| -|stripLinkDefinitions|0.246|0.390|0.219| -|tables|0.002|0.044|0.000| -|unescapeSpecialChars|0.010|0.051|0.007| - - -## [version 1.7.5](https://github.com/showdownjs/showdown/tree/1.7.5) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.562|14.434|0.118| -|performance.testfile.md|30.396|57.886|26.628| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|4.280|8.392|2.357| -|anchors|0.602|5.341|0.285| -|autoLinks|0.092|0.193|0.065| -|blockQuotes|2.068|4.430|1.736| -|codeBlocks|0.279|0.937|0.181| -|codeSpans|0.222|0.592|0.158| -|detab|0.120|0.145|0.091| -|encodeAmpsAndAngles|0.116|0.222|0.096| -|encodeBackslashEscapes|0.140|0.914|0.071| -|encodeCode|1.195|2.009|0.861| -|escapeSpecialCharsWithinTagAttributes|0.307|0.468|0.269| -|githubCodeBlocks|0.197|0.837|0.144| -|hashBlock|0.060|0.442|0.036| -|hashElement|0.002|0.041|0.000| -|hashHTMLSpans|4.289|4.712|4.002| -|hashPreCodeTags|0.281|2.439|0.108| -|headers|1.221|4.603|0.908| -|horizontalRule|0.208|0.352|0.193| -|images|0.182|0.634|0.128| -|italicsAndBold|0.335|1.276|0.239| -|lists|3.143|6.411|2.393| -|outdent|0.398|0.585|0.159| -|paragraphs|5.926|11.596|4.961| -|spanGamut|4.443|6.012|4.024| -|strikethrough|0.003|0.055|0.000| -|stripLinkDefinitions|0.243|0.424|0.215| -|tables|0.003|0.049|0.000| -|unescapeSpecialChars|0.008|0.041|0.006| - - -## [version 1.7.4](https://github.com/showdownjs/showdown/tree/1.7.4) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.972|25.186|0.160| -|performance.testfile.md|30.397|61.913|26.550| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|3.999|6.603|2.314| -|anchors|0.527|3.823|0.285| -|autoLinks|0.090|0.188|0.063| -|blockQuotes|2.057|4.122|1.780| -|codeBlocks|0.247|1.085|0.186| -|codeSpans|0.263|1.017|0.162| -|detab|0.123|0.158|0.097| -|encodeAmpsAndAngles|0.118|0.171|0.096| -|encodeBackslashEscapes|0.079|0.146|0.071| -|encodeCode|0.945|1.453|0.866| -|escapeSpecialCharsWithinTagAttributes|0.285|0.438|0.246| -|githubCodeBlocks|0.225|0.969|0.142| -|hashBlock|0.068|0.577|0.036| -|hashElement|0.002|0.041|0.000| -|hashHTMLSpans|4.126|4.528|3.950| -|hashPreCodeTags|0.149|0.537|0.110| -|headers|1.171|3.877|0.884| -|horizontalRule|0.381|3.457|0.197| -|images|0.195|0.618|0.133| -|italicsAndBold|0.298|0.562|0.245| -|lists|3.790|6.139|2.612| -|outdent|0.167|0.276|0.139| -|paragraphs|5.349|6.076|4.897| -|spanGamut|4.370|6.111|3.946| -|strikethrough|0.003|0.048|0.000| -|stripLinkDefinitions|0.255|0.401|0.218| -|tables|0.002|0.033|0.000| -|unescapeSpecialChars|0.009|0.040|0.007| - - -## [version 1.7.3](https://github.com/showdownjs/showdown/tree/1.7.3) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.277|5.743|0.088| -|performance.testfile.md|30.733|54.768|26.972| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|4.316|8.271|2.339| -|anchors|0.525|3.812|0.288| -|autoLinks|0.085|0.220|0.063| -|blockQuotes|2.033|3.622|1.745| -|codeBlocks|0.251|1.060|0.178| -|codeSpans|0.246|0.749|0.157| -|detab|0.142|0.752|0.087| -|encodeAmpsAndAngles|0.100|0.129|0.095| -|encodeBackslashEscapes|0.079|0.125|0.070| -|encodeCode|0.977|1.774|0.852| -|escapeSpecialCharsWithinTagAttributes|0.271|0.441|0.244| -|githubCodeBlocks|0.235|0.985|0.139| -|hashBlock|0.068|0.550|0.036| -|hashElement|0.002|0.030|0.000| -|hashHTMLSpans|4.197|4.564|4.006| -|hashPreCodeTags|0.139|0.543|0.106| -|headers|1.148|4.214|0.880| -|horizontalRule|0.214|0.273|0.199| -|images|0.310|3.095|0.120| -|italicsAndBold|0.279|0.378|0.235| -|lists|3.843|8.278|2.630| -|outdent|0.193|0.386|0.144| -|paragraphs|5.541|8.153|4.836| -|spanGamut|4.638|5.775|4.142| -|strikethrough|0.003|0.052|0.000| -|stripLinkDefinitions|0.167|0.275|0.142| -|tables|0.002|0.036|0.000| -|unescapeSpecialChars|0.009|0.032|0.008| - - -## [version 1.7.2](https://github.com/showdownjs/showdown/tree/1.7.2) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.292|5.780|0.087| -|performance.testfile.md|30.396|53.860|26.054| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|4.303|7.798|2.377| -|anchors|0.347|0.647|0.287| -|autoLinks|0.088|0.165|0.063| -|blockQuotes|2.101|5.121|1.738| -|codeBlocks|0.239|0.878|0.184| -|codeSpans|0.252|0.628|0.160| -|detab|0.094|0.129|0.088| -|encodeAmpsAndAngles|0.131|0.733|0.093| -|encodeBackslashEscapes|0.080|0.116|0.070| -|encodeCode|0.939|1.480|0.857| -|escapeSpecialCharsWithinTagAttributes|0.285|0.473|0.243| -|githubCodeBlocks|0.214|1.047|0.140| -|hashBlock|0.068|0.553|0.036| -|hashElement|0.002|0.030|0.000| -|hashHTMLSpans|4.323|6.162|4.004| -|hashPreCodeTags|0.147|0.558|0.109| -|headers|1.176|4.491|0.884| -|horizontalRule|0.216|0.264|0.193| -|images|0.156|0.559|0.118| -|italicsAndBold|0.322|1.013|0.237| -|lists|2.753|5.613|2.328| -|outdent|0.163|0.232|0.140| -|paragraphs|5.109|6.168|4.741| -|spanGamut|4.423|6.149|4.001| -|strikethrough|0.003|0.051|0.000| -|stripLinkDefinitions|0.160|0.226|0.142| -|tables|0.002|0.043|0.000| -|unescapeSpecialChars|0.011|0.046|0.007| - - -## [version 1.7.1](https://github.com/showdownjs/showdown/tree/1.7.1) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|1.074|20.566|0.324| -|performance.testfile.md|30.463|82.116|26.022| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|4.233|9.062|2.359| -|anchors|0.351|0.763|0.286| -|autoLinks|0.089|0.190|0.065| -|blockQuotes|2.074|4.989|1.729| -|codeBlocks|0.256|0.937|0.179| -|codeSpans|0.242|0.839|0.158| -|detab|0.099|0.168|0.086| -|encodeAmpsAndAngles|0.131|0.646|0.093| -|encodeBackslashEscapes|0.076|0.140|0.070| -|encodeCode|0.994|1.706|0.865| -|escapeSpecialCharsWithinTagAttributes|0.267|0.375|0.250| -|githubCodeBlocks|0.192|0.966|0.140| -|hashBlock|0.059|0.397|0.036| -|hashElement|0.002|0.031|0.000| -|hashHTMLSpans|4.117|5.585|3.890| -|hashPreCodeTags|0.142|0.529|0.108| -|headers|1.145|4.103|0.864| -|horizontalRule|0.217|0.366|0.194| -|images|0.151|0.553|0.117| -|italicsAndBold|0.312|1.241|0.236| -|lists|4.023|7.077|2.498| -|outdent|0.175|0.261|0.148| -|paragraphs|6.557|8.645|4.997| -|spanGamut|5.073|6.347|4.137| -|strikethrough|0.006|0.110|0.000| -|stripLinkDefinitions|0.164|0.277|0.142| -|tables|0.004|0.080|0.000| -|unescapeSpecialChars|0.009|0.046|0.007| - - -## [version 1.7.0](https://github.com/showdownjs/showdown/tree/1.7.0) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.393|9.953|0.097| -|performance.testfile.md|29.416|54.253|25.949| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|4.062|7.185|2.326| -|anchors|0.488|4.086|0.281| -|autoLinks|0.086|0.200|0.063| -|blockQuotes|2.071|4.554|1.733| -|codeBlocks|0.253|0.864|0.178| -|codeSpans|0.261|0.592|0.160| -|detab|0.095|0.130|0.089| -|encodeAmpsAndAngles|0.103|0.192|0.095| -|encodeBackslashEscapes|0.106|0.589|0.071| -|encodeCode|0.927|1.182|0.835| -|escapeSpecialCharsWithinTagAttributes|0.276|0.617|0.245| -|githubCodeBlocks|0.195|0.980|0.139| -|hashBlock|0.062|0.483|0.035| -|hashElement|0.001|0.025|0.000| -|hashHTMLSpans|4.120|4.610|3.859| -|hashPreCodeTags|0.147|0.535|0.105| -|headers|1.308|4.253|0.856| -|horizontalRule|0.220|0.374|0.194| -|images|0.150|0.507|0.116| -|italicsAndBold|0.306|0.872|0.241| -|lists|3.447|4.893|2.407| -|outdent|0.267|0.868|0.181| -|paragraphs|5.867|8.331|4.970| -|spanGamut|5.039|7.124|4.116| -|strikethrough|0.004|0.073|0.000| -|stripLinkDefinitions|0.153|0.243|0.140| -|tables|0.002|0.044|0.000| -|unescapeSpecialChars|0.009|0.041|0.007| - - -## [version 1.6.4](https://github.com/showdownjs/showdown/tree/1.6.4) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.376|6.381|0.183| -|performance.testfile.md|33.835|61.049|30.186| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|2.564|8.347|1.871| -|anchors|0.499|4.222|0.270| -|autoLinks|0.080|0.174|0.061| -|blockQuotes|3.343|7.306|2.850| -|codeBlocks|0.221|0.822|0.172| -|codeSpans|0.229|0.744|0.156| -|detab|0.097|0.154|0.086| -|encodeAmpsAndAngles|0.117|0.200|0.094| -|encodeBackslashEscapes|0.086|0.230|0.068| -|encodeCode|0.885|1.165|0.816| -|escapeSpecialCharsWithinTagAttributes|0.298|0.495|0.240| -|githubCodeBlocks|0.183|0.785|0.133| -|hashBlock|0.044|0.098|0.035| -|hashElement|0.002|0.033|0.000| -|hashHTMLSpans|4.200|4.552|3.987| -|hashPreCodeTags|0.130|0.313|0.106| -|headers|1.224|4.010|0.945| -|horizontalRule|0.412|4.175|0.196| -|images|0.088|0.203|0.073| -|italicsAndBold|0.276|0.414|0.233| -|lists|5.005|6.109|4.663| -|outdent|0.152|0.337|0.139| -|paragraphs|5.336|7.117|4.843| -|spanGamut|4.450|6.153|3.857| -|strikethrough|0.003|0.049|0.000| -|stripLinkDefinitions|0.180|0.316|0.147| -|tables|0.003|0.055|0.000| -|unescapeSpecialChars|0.009|0.047|0.007| - - -## [version 1.6.3](https://github.com/showdownjs/showdown/tree/1.6.3) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.388|6.064|0.174| -|performance.testfile.md|26.899|49.063|24.845| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|2.616|8.181|1.899| -|anchors|0.515|4.691|0.264| -|autoLinks|0.093|0.188|0.073| -|blockQuotes|4.518|8.953|3.036| -|codeBlocks|0.223|0.348|0.188| -|codeSpans|0.318|1.095|0.177| -|detab|0.092|0.137|0.087| -|encodeAmpsAndAngles|0.044|0.089|0.038| -|encodeBackslashEscapes|0.108|0.265|0.078| -|encodeCode|1.535|9.896|0.865| -|escapeSpecialCharsWithinTagAttributes|0.294|0.523|0.253| -|githubCodeBlocks|0.208|0.790|0.142| -|hashBlock|0.042|0.123|0.036| -|hashElement|0.002|0.029|0.000| -|hashHTMLSpans|0.410|1.598|0.240| -|hashPreCodeTags|0.132|0.395|0.110| -|headers|1.015|1.502|0.806| -|horizontalRule|0.220|0.357|0.195| -|images|0.158|0.978|0.077| -|italicsAndBold|0.288|0.639|0.241| -|lists|5.151|6.331|4.629| -|outdent|0.180|0.363|0.143| -|paragraphs|4.548|6.309|4.002| -|spanGamut|1.519|1.864|1.372| -|strikethrough|0.003|0.065|0.000| -|stripLinkDefinitions|0.179|0.313|0.144| -|tables|0.004|0.063|0.000| -|unescapeSpecialChars|0.011|0.049|0.007| - - -## [version 1.6.2](https://github.com/showdownjs/showdown/tree/1.6.2) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.613|5.894|0.169| -|performance.testfile.md|25.970|62.882|23.710| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|2.669|8.479|1.885| -|anchors|0.500|3.841|0.268| -|autoLinks|0.098|0.211|0.072| -|blockQuotes|3.222|5.826|2.791| -|codeBlocks|0.177|0.371|0.157| -|codeSpans|0.218|0.483|0.151| -|detab|0.135|0.655|0.085| -|encodeAmpsAndAngles|0.042|0.118|0.036| -|encodeBackslashEscapes|0.080|0.133|0.068| -|encodeCode|0.560|0.982|0.484| -|escapeSpecialCharsWithinTagAttributes|0.353|0.568|0.291| -|githubCodeBlocks|0.180|0.773|0.127| -|hashBlock|0.058|0.312|0.037| -|hashElement|0.003|0.046|0.000| -|hashHTMLSpans|0.475|2.325|0.234| -|hashPreCodeTags|0.122|0.307|0.107| -|headers|0.858|0.954|0.780| -|horizontalRule|0.227|0.418|0.197| -|images|0.171|1.453|0.077| -|italicsAndBold|0.101|0.202|0.088| -|lists|4.931|5.460|4.556| -|outdent|0.163|0.315|0.142| -|paragraphs|3.790|5.564|3.278| -|spanGamut|1.442|2.012|1.203| -|strikethrough|0.004|0.082|0.000| -|stripBlankLines|0.086|0.130|0.080| -|stripLinkDefinitions|0.160|0.217|0.145| -|tables|0.004|0.076|0.000| -|unescapeSpecialChars|0.010|0.058|0.007| - - -## [version 1.6.1](https://github.com/showdownjs/showdown/tree/1.6.1) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.317|5.498|0.161| -|readme.md|26.014|46.799|24.245| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|2.641|7.792|1.936| -|anchors|0.475|4.063|0.259| -|autoLinks|0.089|0.197|0.069| -|blockQuotes|3.213|6.054|2.880| -|codeBlocks|0.162|0.269|0.153| -|codeSpans|0.169|0.399|0.141| -|detab|0.125|0.665|0.086| -|encodeAmpsAndAngles|0.042|0.089|0.038| -|encodeBackslashEscapes|0.076|0.133|0.068| -|encodeCode|0.577|0.970|0.479| -|escapeSpecialCharsWithinTagAttributes|0.246|0.350|0.221| -|githubCodeBlocks|0.177|0.815|0.125| -|hashBlock|0.065|0.430|0.038| -|hashElement|0.002|0.034|0.000| -|hashHTMLSpans|0.424|2.321|0.241| -|hashPreCodeTags|0.122|0.238|0.104| -|headers|0.804|0.946|0.726| -|horizontalRule|0.219|0.274|0.194| -|images|0.124|0.902|0.071| -|italicsAndBold|0.101|0.150|0.090| -|lists|4.939|5.421|4.624| -|outdent|0.165|0.337|0.140| -|paragraphs|3.495|4.555|3.171| -|spanGamut|1.319|1.992|1.147| -|strikethrough|0.007|0.143|0.000| -|stripBlankLines|0.094|0.155|0.082| -|stripLinkDefinitions|0.176|0.311|0.146| -|tables|0.002|0.039|0.000| -|unescapeSpecialChars|0.008|0.034|0.007| - - -## [version 1.6.0](https://github.com/showdownjs/showdown/tree/1.6.0) - -### Test Suite: Basic (50 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|Simple "Hello World"|0.308|5.369|0.157| -|readme.md|25.818|47.795|23.775| - -### Test Suite: subParsers (20 cycles) -| test | avgTime | max | min | -|:-----|--------:|----:|----:| -|hashHTMLBlocks|2.653|8.558|1.880| -|anchors|0.517|4.142|0.271| -|autoLinks|0.089|0.194|0.071| -|blockGamut|17.372|22.941|14.082| -|blockQuotes|3.011|4.110|2.774| -|codeBlocks|0.243|0.834|0.193| -|codeSpans|0.227|0.458|0.191| -|detab|0.095|0.133|0.090| -|encodeAmpsAndAngles|0.040|0.073|0.038| -|encodeBackslashEscapes|0.100|0.510|0.068| -|encodeCode|0.532|0.706|0.479| -|escapeSpecialCharsWithinTagAttributes|0.386|0.702|0.327| -|githubCodeBlocks|0.214|0.778|0.156| -|hashBlock|0.057|0.280|0.035| -|hashElement|0.002|0.033|0.000| -|hashHTMLSpans|0.384|1.997|0.236| -|hashPreCodeTags|0.133|0.200|0.116| -|headers|0.944|2.468|0.782| -|images|0.120|0.486|0.086| -|italicsAndBold|0.111|0.445|0.088| -|lists|5.783|13.249|4.464| -|outdent|0.306|0.956|0.225| -|paragraphs|6.583|8.811|4.499| -|spanGamut|2.437|3.067|1.647| -|strikethrough|0.005|0.100|0.000| -|stripBlankLines|0.121|0.175|0.092| -|stripLinkDefinitions|0.247|0.573|0.171| -|tables|0.006|0.099|0.000| -|unescapeSpecialChars|0.017|0.066|0.011| +|hashHTMLBlocks|4.561|7.807|2.461| +|anchors|2.910|6.510|1.056| +|blockQuotes|4.142|19.023|2.541| +|codeBlocks|0.264|0.858|0.194| +|codeSpans|0.365|1.421|0.278| +|detab|0.055|0.116|0.047| +|encodeAmpsAndAngles|0.145|0.796|0.092| +|encodeBackslashEscapes|0.087|0.266|0.063| +|encodeCode|0.605|1.144|0.522| +|escapeSpecialCharsWithinTagAttributes|0.206|0.287|0.184| +|githubCodeBlocks|0.251|1.003|0.192| +|hashBlock|0.038|0.104|0.034| +|hashElement|0.005|0.053|0.001| +|hashHTMLSpans|5.229|9.835|4.240| +|hashPreCodeTags|0.155|0.705|0.117| +|headers|2.278|4.825|1.631| +|horizontalRule|0.159|0.276|0.148| +|images|0.159|0.390|0.124| +|italicsAndBold|0.280|0.773|0.211| +|lists|4.253|8.173|3.146| +|outdent|0.181|0.238|0.162| +|paragraphs|8.968|11.331|7.857| +|spanGamut|2.985|4.162|2.486| +|strikethrough|0.007|0.099|0.001| +|stripLinkDefinitions|1.911|2.855|1.447| +|tables|0.008|0.127|0.002| +|unescapeSpecialChars|0.013|0.073|0.010| diff --git a/src/cli/cli.js b/src/cli/cli.js index c051b55..f1fe223 100644 --- a/src/cli/cli.js +++ b/src/cli/cli.js @@ -1,50 +1,324 @@ /** * Created by tivie */ -'use strict'; +var fs = require('fs'), + json = JSON.parse(fs.readFileSync('package.json', 'utf8')), + version = json.version, + Command = require('commander').Command, + program = new Command(), + showdown; -var yargs = require('yargs'); - -yargs - .version() - .alias('v', 'version') - .option('h', { - alias: 'help', - description: 'Show help' - }) - .option('q', { - alias: 'quiet', - description: 'Quiet mode. Only print errors', - type: 'boolean', - default: false - }) - .option('m', { - alias: 'mute', - description: 'Mute mode. Does not print anything', - type: 'boolean', - default: false - }) - .usage('Usage: showdown [options]') - .demand(1, 'You must provide a valid command') - .command('makehtml', 'Converts markdown into html') - .example('showdown makehtml -i foo.md -o bar.html', 'Converts \'foo.md\' to \'bar.html\'') - .wrap(yargs.terminalWidth()); - -var argv = yargs.argv, - command = argv._[0]; - -if (command === 'makehtml') { - require('./makehtml.cmd.js').run(function (err) { - if (err) { - console.error(err); - } - }); +// require shodown. We use conditional loading for each use case +if (fs.existsSync('../dist/showdown.js')) { + // production. File lives in bin directory + showdown = require('../dist/showdown'); +} else if (fs.existsSync('../../.build/showdown.js')) { + // testing envo, uses the concatenated stuff for testing + showdown = require('../../.build/showdown.js'); } else { - yargs.showHelp(); - process.exit(0); + // cold testing (manual) of cli.js in the src file. We load the dist file + showdown = require('../../dist/showdown'); } -if (argv.help) { - yargs.showHelp(); - process.exit(0); +program + .name('showdown') + .description('CLI to Showdownjs markdown parser v' + version) + .version(version) + .usage(' [options]') + .option('-q, --quiet', 'Quiet mode. Only print errors') + .option('-m, --mute', 'Mute mode. Does not print anything'); + +program.command('makehtml') + .description('Converts markdown into html') + + .addHelpText('after', '\n\nExamples:') + .addHelpText('after', ' showdown makehtml -i Reads from stdin and outputs to stdout') + .addHelpText('after', ' showdown makehtml -i foo.md -o bar.html Reads \'foo.md\' and writes to \'bar.html\'') + .addHelpText('after', ' showdown makehtml -i --flavor="github" Parses stdin using GFM style') + + .addHelpText('after', '\nNote for windows users:') + .addHelpText('after', 'When reading from stdin, use option -u to set the proper encoding or run `chcp 65001` prior to calling showdown cli to set the command line to utf-8') + + .option('-i, --input [file]', 'Input source. Usually a md file. If omitted or empty, reads from stdin. Windows users see note below.', true) + .option('-o, --output [file]', 'Output target. Usually a html file. If omitted or empty, writes to stdout', true) + .option('-u, --encoding ', 'Sets the input encoding', 'utf8') + .option('-y, --output-encoding ', 'Sets the output encoding', 'utf8') + .option('-a, --append', 'Append data to output instead of overwriting. Ignored if writing to stdout', false) + .option('-e, --extensions ', 'Load the specified extensions. Should be valid paths to node compatible extensions') + .option('-p, --flavor ', 'Run with a predetermined flavor of options. Default is vanilla', 'vanilla') + .option('-c, --config ', 'Enables showdown makehtml parser config options. Overrides flavor') + .option('--config-help', 'Shows configuration options for showdown parser') + .action(makehtmlCommand); + +program.parse(); + + +// +// HELPER FUCNTIONS +////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// + +/** + * Messenger helper object to the CLI + * @param {string} writeMode + * @param {boolean} supress + * @param {boolean} mute + * @constructor + */ +function Messenger (writeMode, supress, mute) { + 'use strict'; + writeMode = writeMode || 'stderr'; + supress = (!!supress || !!mute); + mute = !!mute; + this._print = (writeMode === 'stdout') ? console.log : console.error; + + this.errorExit = function (e) { + if (!mute) { + console.error('ERROR: ' + e.message); + console.error('Run \'showdown -h\' for help'); + } + process.exit(1); + }; + + this.okExit = function () { + if (!mute) { + this._print('\n'); + this._print('DONE!'); + } + process.exit(0); + }; + + this.printMsg = function (msg) { + if (supress || mute || !msg) { + return; + } + this._print(msg); + }; + + this.printError = function (msg) { + if (mute) { + return; + } + console.error(msg); + }; + +} + +/** + * Helper function to show Showdown Options + */ +function showShowdownOptions () { + 'use strict'; + var showdownOptions = showdown.getDefaultOptions(false); + console.log('\nshowdown makehtml config options:'); + // show showdown options + for (var sopt in showdownOptions) { + if (showdownOptions.hasOwnProperty(sopt)) { + console.log(' ' + sopt + ':', '[default=' + showdownOptions[sopt].defaultValue + ']',showdownOptions[sopt].describe); + } + } + console.log('\n\nExample: showdown makehtml -c openLinksInNewWindow ghMentions ghMentionsLink="https://google.com"'); +} + +/** + * Helper function to parse showdown options + * @param {{}} configOptions + * @param {{}} defaultOptions + * @returns {{}} + */ +function parseShowdownOptions (configOptions, defaultOptions) { + 'use strict'; + var shOpt = defaultOptions; + + // first prepare passed options + if (configOptions) { + for (var i = 0; i < configOptions.length; ++i) { + var opt = configOptions[i], + key = configOptions[i], + val = true; + if (/=/.test(opt)) { + key = opt.split('=')[0]; + val = opt.split('=')[1]; + } + shOpt[key] = val; + } + } + return shOpt; +} + +/** + * Reads stdin + * @returns {string} + */ +function readFromStdIn (encoding) { + 'use strict'; + var size = fs.fstatSync(process.stdin.fd).size; + if (size <= 0) { + throw new Error('Could not read from stdin, reason: stdin is empty'); + } + encoding = encoding || 'utf8'; + try { + return size > 0 ? fs.readFileSync(process.stdin.fd, encoding).toString() : ''; + } catch (e) { + throw new Error('Could not read from stdin, reason: ' + e.message); + } +} + +/** + * Reads from a file + * @param {string} file Filepath to dile + * @param {string} encoding Encoding of the file + * @returns {Buffer} + */ +function readFromFile (file, encoding) { + 'use strict'; + try { + return fs.readFileSync(file, encoding); + } catch (err) { + throw new Error('Could not read from file ' + file + ', reason: ' + err.message); + } +} + +/** + * Writes to stdout + * @param {string} html + * @returns {boolean} + */ +function writeToStdOut (html) { + 'use strict'; + if (!process.stdout.write(html)) { + throw new Error('Could not write to StdOut'); + } +} + +/** + * Writes to file + * @param {string} html HTML to write + * @param {string} file Filepath + * @param {boolean} append If the result should be appended + */ +function writeToFile (html, file, append) { + 'use strict'; + // If a flag is passed, it means we should append instead of overwriting. + // Only works with files, obviously + var write = (append) ? fs.appendFileSync : fs.writeFileSync; + try { + write(file, html); + } catch (err) { + throw new Error('Could not write to file ' + file + ', readon: ' + err.message); + } +} + +/** + * makehtml command + * @param {{}} options + * @param {Command} cmd + */ +function makehtmlCommand (options, cmd) { + 'use strict'; + + // show configuration options for showdown helper if configHelp was passed + if (options.configHelp) { + showShowdownOptions(); + return; + } + + var quiet = !!(cmd.parent._optionValues.quiet), + mute = !!(cmd.parent._optionValues.mute), + readMode = (!options.input || options.input === '' || options.input === true) ? 'stdin' : 'file', + writeMode = (!options.output || options.output === '' || options.output === true) ? 'stdout' : 'file', + msgMode = (writeMode === 'file') ? 'stdout' : 'stderr', + // initiate Messenger helper, can maybe be replaced with commanderjs internal stuff + messenger = new Messenger(msgMode, quiet, mute), + defaultOptions = showdown.getDefaultOptions(true), + md, html; + + // deal with flavor first since config flag overrides flavor individual options + if (options.flavor) { + messenger.printMsg('Enabling flavor ' + options.flavor + '...'); + defaultOptions = showdown.getFlavorOptions(options.flavor); + if (!defaultOptions) { + messenger.errorExit(new Error('Flavor ' + options.flavor + ' is not recognised')); + return; + } + messenger.printMsg('OK!'); + } + // store config options in the options.config as an object + options.config = parseShowdownOptions(options.config, defaultOptions); + + // print enabled options + for (var o in options.config) { + if (options.config.hasOwnProperty(o) && options.config[o] === true) { + messenger.printMsg('Enabling option ' + o); + } + } + + // initialize the converter + messenger.printMsg('\nInitializing converter...'); + var converter; + try { + converter = new showdown.Converter(options.config); + } catch (e) { + messenger.errorExit(e); + return; + } + messenger.printMsg('OK!'); + + // load extensions + if (options.extensions) { + messenger.printMsg('\nLoading extensions...'); + for (var i = 0; i < options.extensions.length; ++i) { + try { + messenger.printMsg(options.extensions[i]); + var ext = require(options.extensions[i]); + converter.addExtension(ext, options.extensions[i]); + messenger.printMsg(options.extensions[i] + ' loaded...'); + } catch (e) { + messenger.printError('Could not load extension ' + options.extensions[i] + '. Reason:'); + messenger.errorExit(e); + } + } + } + + messenger.printMsg('...'); + // read the input + messenger.printMsg('Reading data from ' + readMode + '...'); + + if (readMode === 'stdin') { + try { + md = readFromStdIn(options.encoding); + } catch (err) { + messenger.errorExit(err); + return; + } + } else { + try { + md = readFromFile(options.input, options.encoding); + } catch (err) { + messenger.errorExit(err); + return; + } + } + + // process the input + messenger.printMsg('Parsing markdown...'); + html = converter.makeHtml(md); + + // write the output + messenger.printMsg('Writing data to ' + writeMode + '...'); + if (writeMode === 'stdout') { + try { + writeToStdOut(html); + } catch (err) { + messenger.errorExit(err); + return; + } + } else { + try { + writeToFile(html, options.output, options.append); + } catch (err) { + messenger.errorExit(err); + return; + } + } + messenger.okExit(); } diff --git a/src/cli/makehtml.cmd.js b/src/cli/makehtml.cmd.js deleted file mode 100644 index 66ec4f3..0000000 --- a/src/cli/makehtml.cmd.js +++ /dev/null @@ -1,200 +0,0 @@ -var yargs = require('yargs'), - fs = require('fs'), - Messenger = require('./messenger.js'), - showdown = require('../../dist/showdown'), - showdownOptions = showdown.getDefaultOptions(false); - -yargs.reset() - .usage('Usage: showdown makehtml [options]') - .example('showdown makehtml -i', 'Reads from stdin and outputs to stdout') - .example('showdown makehtml -i foo.md -o bar.html', 'Reads \'foo.md\' and writes to \'bar.html\'') - .example('showdown makehtml -i --flavor="github"', 'Parses stdin using GFM style') - .version() - .alias('v', 'version') - .config('c') - .alias('c', 'config') - .help('h') - .alias('h', 'help') - .option('i', { - alias : 'input', - describe: 'Input source. Usually a md file. If omitted or empty, reads from stdin', - type: 'string' - }) - .option('o', { - alias : 'output', - describe: 'Output target. Usually a html file. If omitted or empty, writes to stdout', - type: 'string', - default: false - }) - .option('u', { - alias : 'encoding', - describe: 'Input encoding', - type: 'string' - }) - .option('a', { - alias : 'append', - describe: 'Append data to output instead of overwriting', - type: 'string', - default: false - }) - .option('e', { - alias : 'extensions', - describe: 'Load the specified extensions. Should be valid paths to node compatible extensions', - type: 'array' - }) - .option('p', { - alias : 'flavor', - describe: 'Run with a predetermined flavor of options. Default is vanilla', - type: 'string' - }) - .option('q', { - alias: 'quiet', - description: 'Quiet mode. Only print errors', - type: 'boolean', - default: false - }) - .option('m', { - alias: 'mute', - description: 'Mute mode. Does not print anything', - type: 'boolean', - default: false - }); - -// load showdown default options -for (var opt in showdownOptions) { - if (showdownOptions.hasOwnProperty(opt)) { - if (showdownOptions[opt].defaultValue === false) { - showdownOptions[opt].default = null; - } else { - showdownOptions[opt].default = showdownOptions[opt].defaultValue; - } - yargs.option(opt, showdownOptions[opt]); - } -} - -function run (cb) { - 'use strict'; - var argv = yargs.argv, - readMode = (!argv.i || argv.i === '') ? 'stdin' : 'file', - writeMode = (!argv.o || argv.o === '') ? 'stdout' : 'file', - msgMode = (writeMode === 'file') ? 'stdout' : 'stderr', - /** - * MSG object - * @type {Messenger} - */ - messenger = new Messenger(msgMode, argv.q, argv.m), - write = (writeMode === 'stdout') ? writeToStdOut : writeToFile, - enc = argv.encoding || 'utf8', - flavor = argv.p, - append = argv.a || false, - options = parseOptions(flavor), - converter = new showdown.Converter(options), - html; - - // Load extensions - if (argv.e) { - messenger.printMsg('Loading extensions'); - for (var i = 0; i < argv.e.length; ++i) { - try { - var ext = require(argv.e[i]); - converter.addExtension(ext, argv.e[i]); - } catch (e) { - messenger.printError('Could not load extension ' + argv.e[i] + '. Reason:'); - messenger.errorExit(e); - } - } - } - - messenger.printMsg('...'); - // read the input - messenger.printMsg('Reading data from ' + readMode + '...'); - - readFrom(argv.i, enc, function (err, md) { - if (err) { - return cb(err); - } - - // process the input - messenger.printMsg('Parsing markdown...'); - html = converter.makeHtml(md); - - // write the output - messenger.printMsg('Writing data to ' + writeMode + '...'); - write(html, append); - messenger.okExit(); - cb(); - }); - - function parseOptions (flavor) { - var options = {}, - flavorOpts = showdown.getFlavorOptions(flavor) || {}; - - // if flavor is not undefined, let's tell the user we're loading that preset - if (flavor) { - messenger.printMsg('Loading ' + flavor + ' flavor.'); - } - - for (var opt in argv) { - if (argv.hasOwnProperty(opt)) { - // first we load the default options - if (showdownOptions.hasOwnProperty(opt) && showdownOptions[opt].default !== null) { - options[opt] = showdownOptions[opt].default; - } - - // we now override defaults with flavor, if a flavor was indeed passed - if (flavorOpts.hasOwnProperty(opt)) { - options[opt] = flavorOpts[opt]; - } - - // lastly we override with explicit passed options - // being careful not to pass CLI specific options, such as -v, -h or --extensions - if (showdownOptions.hasOwnProperty(opt)) { - if (argv[opt] === true) { - messenger.printMsg('Enabling option ' + opt); - options[opt] = argv[opt]; - } else if (argv[opt] === false) { - options[opt] = argv[opt]; - } - } - } - } - return options; - } - - function readFrom (src, enc, cb) { - var stream = process.stdin; - if (src && src.length) { - stream = fs.createReadStream(src, {encoding: enc}); - } else { - process.stdin.setEncoding(enc); - process.stdin.resume(); - } - var data = ''; - stream.on('data', function (chunk) { - data += chunk.toString(); - }); - stream.on('end',function () { - cb(null, data); - }); - stream.on('error', cb); - } - - function writeToStdOut (html) { - return process.stdout.write(html); - } - - function writeToFile (html, append) { - // If a flag is passed, it means we should append instead of overwriting. - // Only works with files, obviously - var write = (append) ? fs.appendFileSync : fs.writeFileSync; - try { - write(argv.o, html); - } catch (err) { - messenger.errorExit(err); - } - } -} - -module.exports = exports = { - run: run -}; diff --git a/src/cli/messenger.js b/src/cli/messenger.js deleted file mode 100644 index 906fb2e..0000000 --- a/src/cli/messenger.js +++ /dev/null @@ -1,40 +0,0 @@ -function Messenger (writeMode, supress, mute) { - 'use strict'; - writeMode = writeMode || 'stderr'; - supress = (!!supress || !!mute); - mute = !!mute; - this._print = (writeMode === 'stdout') ? console.log : console.error; - - this.errorExit = function (e) { - if (!mute) { - console.error('ERROR: ' + e.message); - console.error('Run \'showdown -h\' for help'); - } - process.exit(1); - }; - - this.okExit = function () { - if (!mute) { - this._print('\n'); - this._print('DONE!'); - } - process.exit(0); - }; - - this.printMsg = function (msg) { - if (supress || mute || !msg) { - return; - } - this._print(msg); - }; - - this.printError = function (msg) { - if (mute) { - return; - } - console.error(msg); - }; - -} - -module.exports = Messenger; diff --git a/src/options.js b/src/options.js index 0e32913..19deb66 100644 --- a/src/options.js +++ b/src/options.js @@ -93,77 +93,77 @@ function getDefaultOpts (simple) { }, smartIndentationFix: { defaultValue: false, - description: 'Tries to smartly fix indentation in es6 strings', + describe: 'Tries to smartly fix indentation in es6 strings', type: 'boolean' }, disableForced4SpacesIndentedSublists: { defaultValue: false, - description: 'Disables the requirement of indenting nested sublists by 4 spaces', + describe: 'Disables the requirement of indenting nested sublists by 4 spaces', type: 'boolean' }, simpleLineBreaks: { defaultValue: false, - description: 'Parses simple line breaks as
(GFM Style)', + describe: 'Parses simple line breaks as
(GFM Style)', type: 'boolean' }, requireSpaceBeforeHeadingText: { defaultValue: false, - description: 'Makes adding a space between `#` and the header text mandatory (GFM Style)', + describe: 'Makes adding a space between `#` and the header text mandatory (GFM Style)', type: 'boolean' }, ghMentions: { defaultValue: false, - description: 'Enables github @mentions', + describe: 'Enables github @mentions', type: 'boolean' }, ghMentionsLink: { defaultValue: 'https://github.com/{u}', - description: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.', + describe: 'Changes the link generated by @mentions. Only applies if ghMentions option is enabled.', type: 'string' }, encodeEmails: { defaultValue: true, - description: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities', + describe: 'Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities', type: 'boolean' }, openLinksInNewWindow: { defaultValue: false, - description: 'Open all links in new windows', + describe: 'Open all links in new windows', type: 'boolean' }, backslashEscapesHTMLTags: { defaultValue: false, - description: 'Support for HTML Tag escaping. ex: \
foo\
', + describe: 'Support for HTML Tag escaping. ex: \
foo\
', type: 'boolean' }, emoji: { defaultValue: false, - description: 'Enable emoji support. Ex: `this is a :smile: emoji`', + describe: 'Enable emoji support. Ex: `this is a :smile: emoji`', type: 'boolean' }, underline: { defaultValue: false, - description: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``', + describe: 'Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``', type: 'boolean' }, ellipsis: { defaultValue: true, - description: 'Replaces three dots with the ellipsis unicode character', + describe: 'Replaces three dots with the ellipsis unicode character', type: 'boolean' }, completeHTMLDocument: { defaultValue: false, - description: 'Outputs a complete html document, including ``, `` and `` tags', + describe: 'Outputs a complete html document, including ``, `` and `` tags', type: 'boolean' }, metadata: { defaultValue: false, - description: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).', + describe: 'Enable support for document metadata (defined at the top of the document between `«««` and `»»»` or between `---` and `---`).', type: 'boolean' }, splitAdjacentBlockquotes: { defaultValue: false, - description: 'Split adjacent blockquote blocks', + describe: 'Split adjacent blockquote blocks', type: 'boolean' }, moreStyling: { diff --git a/src/showdown.js b/src/showdown.js index a13863d..76a6e68 100644 --- a/src/showdown.js +++ b/src/showdown.js @@ -187,7 +187,7 @@ showdown.subParser = function (name, func) { * Gets or registers an extension * @static * @param {string} name - * @param {object|function=} ext + * @param {object|object[]|function=} ext * @returns {*} */ showdown.extension = function (name, ext) { diff --git a/test/cli/basic.html b/test/cli/basic.html index a014504..c42f755 100644 --- a/test/cli/basic.html +++ b/test/cli/basic.html @@ -1,3 +1,2 @@

some title

-

Test bold and italic

diff --git a/test/mocks/mock-extension.js b/test/mocks/mock-extension.js new file mode 100644 index 0000000..cbb1c98 --- /dev/null +++ b/test/mocks/mock-extension.js @@ -0,0 +1,14 @@ +var showdown = require('../../.build/showdown.js'); + +var ext = { + type: 'lang', + regex: /foo/g, + replace: 'bar' +}; + +showdown.extension('mockextension', function () { + 'use strict'; + return [ext]; +}); + +module.exports = ext; diff --git a/test/performance/performance.js b/test/performance/performance.js index a68e912..f04081f 100644 --- a/test/performance/performance.js +++ b/test/performance/performance.js @@ -49,10 +49,7 @@ function runTests () { showdown.subParser('makehtml.hashHTMLBlocks')(testMDFile, options, globals); }) .add('anchors', function () { - showdown.subParser('makehtml.anchors')(testMDFile, options, globals); - }) - .add('autoLinks', function () { - showdown.subParser('makehtml.autoLinks')(testMDFile, options, globals); + showdown.subParser('makehtml.links')(testMDFile, options, globals); }) .add('blockQuotes', function () { showdown.subParser('makehtml.blockQuotes')(testMDFile, options, globals); diff --git a/test/unit/cli.js b/test/unit/cli.js new file mode 100644 index 0000000..02d372a --- /dev/null +++ b/test/unit/cli.js @@ -0,0 +1,293 @@ +var fs = require('fs'), + path = require('path'), + chai = require('chai'), + expect = chai.expect, + chaiMatch = require('chai-match'), + execSync = require('child_process').execSync, + spawnSync = require('child_process').spawnSync, + cmd = 'node src/cli/cli.js', + packageJson = JSON.parse(fs.readFileSync('package.json', 'utf8')); + +require('sinon'); +chai.should(); +chai.use(chaiMatch); + +/** + * Spawns a CLI process synchrously + * @param {string|null} command + * @param {string[]} args + * @param {{}} [options] + * @returns {{output: *, stdout: string, stderr: string, status: number}} + */ +function spawnCLI (command, args, options) { + 'use strict'; + var nargs = ['src/cli/cli.js']; + if (command) { nargs.push(command);} + args = nargs.concat(args); + var otp = spawnSync('node', args, options), + stdout = otp.stdout.toString(), + stderr = otp.stderr.toString(), + output = otp.output[0], + status = otp.status; + + return {stdout: stdout, stderr: stderr, output: output, status: status}; +} + +describe('showdown cli', function () { + 'use strict'; + + describe('without commands', function () { + + it('should display help if no commands are specified', function () { + var proc = spawnCLI(null, [], {}); + proc.status.should.equal(1); + proc.stderr.should.contain('CLI to Showdownjs markdown parser'); + proc.stderr.should.contain('Usage:'); + proc.stderr.should.contain('Options:'); + proc.stderr.should.contain('Commands:'); + proc.stdout.should.equal(''); + }); + + describe('-h', function () { + it('should display help', function () { + var proc = spawnCLI(null, ['-h'], {}); + proc.status.should.equal(0); + proc.stdout.should.contain('CLI to Showdownjs markdown parser'); + proc.stdout.should.contain('Usage:'); + proc.stdout.should.contain('Options:'); + proc.stdout.should.contain('Commands:'); + proc.stderr.should.equal(''); + }); + }); + + describe('-v', function () { + it('should display version', function () { + var proc = spawnCLI(null, ['-V'], {}); + proc.status.should.equal(0); + proc.stdout.should.match(/^\d{1,2}\.\d{1,3}\.\d{1,3}/); + proc.stdout.should.match(/^(\d{1,2}\.\d{1,3}\.\d{1,3})/).and.capture(0).equals(packageJson.version); + proc.stderr.should.equal(''); + }); + }); + }); + + describe('makehtml command', function () { + + describe('makehtml without flags', function () { + it('should read from stdin and output to stdout', function () { + var proc = spawnCLI('makehtml', [], { + input: '**foo**', + encoding: 'utf-8' + }); + proc.status.should.equal(0); + proc.stdout.should.equal('

foo

'); + proc.stderr.should.not.equal(''); + }); + }); + + describe('makehtml -p', function () { + + it('should enable a flavor', function () { + var proc = spawnCLI('makehtml', ['-p', 'github'], { + input: 'this is a :smile:', // test the emoji option as a proxy + encoding: 'utf-8' + }); + proc.status.should.equal(0); + proc.stderr.should.contain('Enabling flavor github...'); + proc.stdout.should.equal('

this is a 😄

'); + //'Here in London'.should.match(/(here|there) in (\w+)/i).and.capture(1).equals('London'); + }); + + it('should give an error if a flavor is not recognised', function () { + var proc = spawnCLI('makehtml', ['-p', 'foobar'], { + input: '**foo**', + encoding: 'utf-8' + }); + proc.status.should.equal(1); + }); + }); + + describe('makehtml -c', function () { + it('should not parse emoji if config option is not passed', function () { + var proc = spawnCLI('makehtml', [], { + input: 'this is a :smile:', + encoding: 'utf-8' + }); + proc.status.should.equal(0); + proc.stderr.should.not.contain('Enabling option emoji'); + proc.stdout.should.equal('

this is a :smile:

'); + }); + + it('should enable a showdown option', function () { + var proc = spawnCLI('makehtml', ['-c', 'emoji'], { + input: 'this is a :smile:', + encoding: 'utf-8' + }); + proc.status.should.equal(0); + proc.stderr.should.contain('Enabling option emoji'); + proc.stdout.should.equal('

this is a 😄

'); + }); + + it('should ignore unrecognized options', function () { + var proc = spawnCLI('makehtml', ['-c', 'foobar'], { + input: 'foo', + encoding: 'utf-8' + }); + proc.status.should.equal(0); + proc.stderr.should.contain('Enabling option foobar'); + proc.stdout.should.equal('

foo

'); + }); + + }); + + describe('makehtml -m', function () { + + it('should mute information', function () { + var proc = spawnCLI('makehtml', ['-m', '-i'], {input: '**foo**'}); + proc.status.should.equal(0); + expect(proc.output).to.be.null; // jshint ignore:line + proc.stdout.should.equal('

foo

'); + proc.stderr.should.equal(''); + }); + + it('should mute everything, even errors', function () { + var proc = spawnCLI('makehtml', ['-m', '-i']); + proc.status.should.equal(1); + expect(proc.output).to.be.null; // jshint ignore:line + proc.stdout.should.equal(''); + proc.stderr.should.equal(''); + }); + + it('should not mute parsed html', function () { + var proc = spawnCLI('makehtml', ['-m', '-i'], { + input: '**foo**', + encoding: 'utf-8' + }); + proc.status.should.equal(0); + proc.stdout.should.equal('

foo

'); + proc.stderr.should.equal(''); + }); + }); + + describe('makehtml -q', function () { + + it('should not display information', function () { + var proc = spawnCLI('makehtml', ['-q', '-i'], {input: '**foo**'}); + proc.status.should.equal(0); + expect(proc.output).to.be.null; // jshint ignore:line + proc.stdout.should.equal('

foo

'); + proc.stderr.should.match(/^\s*DONE!\s*$/); + }); + + it('should display errors', function () { + var proc = spawnCLI('makehtml', ['-q', '-i']); + proc.status.should.equal(1); + expect(proc.output).to.be.null; // jshint ignore:line + proc.stdout.should.equal(''); + proc.stderr.should.match(/^ERROR:/); + }); + + it('should not mute parsed html', function () { + var proc = spawnCLI('makehtml', ['-q', '-i'], { + input: '**foo**', + encoding: 'utf-8' + }); + proc.status.should.equal(0); + proc.stdout.should.equal('

foo

'); + proc.stderr.should.match(/^\s*DONE!\s*$/); + }); + }); + + describe('makehtml -i -o', function () { + it('should read from stdin and output to stdout', function () { + var proc = spawnCLI('makehtml', ['-i', '-o'], { + input: '**foo**', + encoding: 'utf-8' + }); + proc.status.should.equal(0); + proc.stdout.should.equal('

foo

'); + proc.stderr.should.not.equal(''); + }); + }); + + describe('makehtml -i -o', function () { + it('should read from a file and output to stdout', function () { + var expectedOtp = fs.readFileSync('test/cli/basic.html', 'utf8').toString().trim(), + proc = spawnCLI('makehtml', ['-i', 'test/cli/basic.md'], {encoding: 'utf-8'}); + + proc.status.should.equal(0); + proc.stdout.should.equal(expectedOtp); + proc.stderr.should.not.equal(''); + }); + }); + + describe('makehtml -i -o ', function () { + it('should read from stdin and output to a file', function () { + execSync(cmd + ' makehtml -m -i -o .build/io1.html', { + encoding: 'utf8', + input: '**foo**' + }); + var otp = fs.readFileSync('.build/io1.html', 'utf8').toString().trim(), + expectedOtp = '

foo

'; + + otp.trim().should.equal(expectedOtp); + }); + }); + + describe('makehtml -i -o ', function () { + it('should read from a file and output to a file', function () { + var expectedOtp = fs.readFileSync('test/cli/basic.html', 'utf8').toString().trim(), + proc = spawnCLI('makehtml', ['-i', 'test/cli/basic.md', '-o', '.build/io2.html'], {encoding: 'utf-8'}), + otp = fs.readFileSync('.build/io2.html', 'utf8').toString().trim(); + + otp.trim().should.equal(expectedOtp); + proc.stdout.should.not.equal(expectedOtp); + proc.stderr.should.equal(''); + proc.status.should.equal(0); + }); + }); + + describe('makehtml -a', function () { + it('should read from stdin and append to a file', function () { + fs.writeFileSync('.build/io3.html', '

foo

'); + + var expectedOtp = '

foo

foo

', + proc = spawnCLI('makehtml', ['-i', '-o', '.build/io3.html', '-a'], { + encoding: 'utf8', + input: '**foo**' + }), + otp = fs.readFileSync('.build/io3.html', 'utf8').toString().trim(); + + proc.status.should.equal(0); + otp.trim().should.equal(expectedOtp); + // since the output is to a file, messages are logged to stdout + proc.stdout.should.not.equal(expectedOtp); + // stderr should be empty + proc.stderr.should.equal(''); + }); + + it('should ignore -a flag if -o is missing', function () { + + var expectedOtp = '

foo

', + proc = spawnCLI('makehtml', ['-a'], {encoding: 'utf8', input: '**foo**'}); + proc.status.should.equal(0); + proc.stderr.should.not.equal(''); + proc.stdout.should.equal(expectedOtp); + }); + }); + + describe('makehtml -e', function () { + it('should load the extension', function () { + var expectedOtp = '

bar

', + extPath = path.resolve(__dirname + '/../mocks/mock-extension.js'), + proc = spawnCLI('makehtml', ['-i', '-o', '-e', extPath], { + encoding: 'utf8', + input: '**foo**' + }); + proc.status.should.equal(0, 'Process exited with error state'); + proc.stdout.trim().should.equal(expectedOtp); + }); + }); + + }); +}); diff --git a/test/unit/showdown.Converter.makeMarkdown.js b/test/unit/showdown.Converter.makeMarkdown.js new file mode 100644 index 0000000..fb85bf2 --- /dev/null +++ b/test/unit/showdown.Converter.makeMarkdown.js @@ -0,0 +1,25 @@ +/** + * Created by Estevao on 15-01-2015. + */ + +describe('showdown.Converter', function () { + 'use strict'; + + require('source-map-support').install(); + require('chai').should(); + var jsdom = require('jsdom'), + document = new jsdom.JSDOM('', {}).window.document, // jshint ignore:line + showdown = require('../../.build/showdown.js'); + + describe('makeMarkdown()', function () { + var converter = new showdown.Converter(); + + it('should parse a simple html string', function () { + var html = 'a link\n'; + var md = '[a link]()'; + + converter.makeMarkdown(html, document).should.equal(md); + }); + + }); +}); diff --git a/test/unit/showdown.js b/test/unit/showdown.js index dc297e4..64465d0 100644 --- a/test/unit/showdown.js +++ b/test/unit/showdown.js @@ -3,6 +3,7 @@ require('chai').should(); var expect = require('chai').expect, showdown = require('../../.build/showdown.js'); + describe('showdown.options', function () { 'use strict'; @@ -34,21 +35,37 @@ describe('showdown.extension()', function () { return extObjMock; }; - describe('should register', function () { - it('an extension object', function () { + describe('file loading', function () { + + beforeEach(function () { + this.extension = require('../mocks/mock-extension'); + }); + + it('should register an extension from a file', function () { + showdown.extension('mockextension').should.be.an('array'); + showdown.extension('mockextension').should.eql([this.extension]); + }); + + afterEach(function () { + showdown.resetExtensions(); + }); + + }); + + + describe('objects', function () { + it('should register an extension object', function () { showdown.extension('foo', extObjMock); showdown.extension('foo').should.eql([extObjMock]); - showdown.resetExtensions(); }); - it('an extension function', function () { - showdown.extension('foo', extObjFunc); - showdown.extension('foo').should.eql([extObjMock]); - showdown.resetExtensions(); + it('should register an extension function', function () { + showdown.extension('bar', extObjFunc); + showdown.extension('bar').should.eql([extObjMock]); }); - it('a listener extension', function () { - showdown.extension('foo', { + it('should register a listener extension', function () { + showdown.extension('baz', { type: 'listener', listeners: { foo: function (name, txt) { @@ -56,19 +73,16 @@ describe('showdown.extension()', function () { } } }); - showdown.resetExtensions(); }); - }); - describe('should refuse to register', function () { - it('a generic object', function () { + it('should refuse to register a generic object', function () { var fn = function () { showdown.extension('foo', {}); }; expect(fn).to.throw(); }); - it('an extension with invalid type', function () { + it('should refuse to register an extension with invalid type', function () { var fn = function () { showdown.extension('foo', { type: 'foo' @@ -77,7 +91,7 @@ describe('showdown.extension()', function () { expect(fn).to.throw(/type .+? is not recognized\. Valid values: "lang\/language", "output\/html" or "listener"/); }); - it('an extension without regex or filter', function () { + it('should refuse to register an extension without regex or filter', function () { var fn = function () { showdown.extension('foo', { type: 'lang' @@ -86,7 +100,7 @@ describe('showdown.extension()', function () { expect(fn).to.throw(/extensions must define either a "regex" property or a "filter" method/); }); - it('a listener extension without a listeners property', function () { + it('should refuse to register a listener extension without a listeners property', function () { var fn = function () { showdown.extension('foo', { type: 'listener' @@ -94,7 +108,13 @@ describe('showdown.extension()', function () { }; expect(fn).to.throw(/Extensions of type "listener" must have a property called "listeners"/); }); + + afterEach(function () { + showdown.resetExtensions(); + }); + }); + }); describe('showdown.getAllExtensions()', function () {