From 2b26bbe78a1a2b8b427963a6c44c3853efdb737e Mon Sep 17 00:00:00 2001 From: Lauri Ojansivu Date: Fri, 6 Mar 2020 03:52:12 +0200 Subject: Fix: img tag did not allow width and height. Removed swipebox from markdown editor img tag and updated marked markdown to newest version. Thanks to hradec and xet7 ! Closes #2956 --- packages/markdown/marked/test/specs/run-spec.js | 52 ------------------------- 1 file changed, 52 deletions(-) delete mode 100644 packages/markdown/marked/test/specs/run-spec.js (limited to 'packages/markdown/marked/test/specs/run-spec.js') diff --git a/packages/markdown/marked/test/specs/run-spec.js b/packages/markdown/marked/test/specs/run-spec.js deleted file mode 100644 index 3af0aa45..00000000 --- a/packages/markdown/marked/test/specs/run-spec.js +++ /dev/null @@ -1,52 +0,0 @@ -function runSpecs(title, file, options) { - const json = require(file); - let longestName = 0; - let maxSpecs = 0; - const specs = json.reduce((obj, spec) => { - if (!obj[spec.section]) { - longestName = Math.max(spec.section.length, longestName); - obj[spec.section] = { - specs: [], - pass: 0, - total: 0 - }; - } - obj[spec.section].total++; - maxSpecs = Math.max(obj[spec.section].total, maxSpecs); - if (!spec.shouldFail) { - obj[spec.section].pass++; - } - obj[spec.section].specs.push(spec); - return obj; - }, {}); - - describe(title, () => { - const maxSpecsLen = ('' + maxSpecs).length; - const spaces = maxSpecsLen * 2 + longestName + 11; - console.log('-'.padEnd(spaces + 4, '-')); - console.log(`| ${title.padStart(Math.ceil((spaces + title.length) / 2)).padEnd(spaces)} |`); - console.log(`| ${' '.padEnd(spaces)} |`); - Object.keys(specs).forEach(section => { - console.log(`| ${section.padEnd(longestName)} ${('' + specs[section].pass).padStart(maxSpecsLen)} of ${('' + specs[section].total).padStart(maxSpecsLen)} ${(100 * specs[section].pass / specs[section].total).toFixed().padStart(4)}% |`); - describe(section, () => { - specs[section].specs.forEach((spec) => { - if (options) { - spec.options = Object.assign({}, options, (spec.options || {})); - } - (spec.only ? fit : it)('should ' + (spec.shouldFail ? 'fail' : 'pass') + ' example ' + spec.example, () => { - if (spec.shouldFail) { - expect(spec).not.toRender(spec.html); - } else { - expect(spec).toRender(spec.html); - } - }); - }); - }); - }); - console.log('-'.padEnd(spaces + 4, '-')); - console.log(); - }); -}; - -runSpecs('GFM 0.29', './gfm/gfm.0.29.json', {gfm: true}); -runSpecs('CommonMark 0.29', './commonmark/commonmark.0.29.json', {headerIds: false}); -- cgit v1.2.3-1-g7c22