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 --- .../markdown/marked/test/specs/gfm/getSpecs.js | 44 ---------------------- 1 file changed, 44 deletions(-) delete mode 100644 packages/markdown/marked/test/specs/gfm/getSpecs.js (limited to 'packages/markdown/marked/test/specs/gfm/getSpecs.js') diff --git a/packages/markdown/marked/test/specs/gfm/getSpecs.js b/packages/markdown/marked/test/specs/gfm/getSpecs.js deleted file mode 100644 index 2746bdbb..00000000 --- a/packages/markdown/marked/test/specs/gfm/getSpecs.js +++ /dev/null @@ -1,44 +0,0 @@ -const fetch = require('node-fetch'); -const cheerio = require('cheerio'); -const marked = require('../../../'); -const htmlDiffer = require('../../helpers/html-differ.js'); -const fs = require('fs'); - -fetch('https://github.github.com/gfm/') - .then(res => res.text()) - .then(html => cheerio.load(html)) - .then($ => { - const version = $('.version').text().match(/\d+\.\d+/)[0]; - if (!version) { - throw new Error('No version found'); - } - const specs = []; - $('.extension').each((i, ext) => { - const section = $('.definition', ext).text().trim().replace(/^\d+\.\d+(.*?) \(extension\)[\s\S]*$/, '$1'); - $('.example', ext).each((j, exa) => { - const example = +$(exa).attr('id').replace(/\D/g, ''); - const markdown = $('.language-markdown', exa).text().trim(); - const html = $('.language-html', exa).text().trim(); - specs.push({ - section, - html, - markdown, - example - }); - }); - }); - - return [version, specs]; - }) - .then(([version, specs]) => { - specs.forEach(spec => { - const html = marked(spec.markdown, {gfm: true}); - if (!htmlDiffer.isEqual(html, spec.html)) { - spec.shouldFail = true; - } - }); - fs.writeFileSync(`gfm.${version}.json`, JSON.stringify(specs, null, 2) + '\n'); - }) - .catch((err) => { - console.error(err); - }); -- cgit v1.2.3-1-g7c22