diff options
author | Lauri Ojansivu <x@xet7.org> | 2020-03-06 03:52:12 +0200 |
---|---|---|
committer | Lauri Ojansivu <x@xet7.org> | 2020-03-06 03:52:12 +0200 |
commit | 2b26bbe78a1a2b8b427963a6c44c3853efdb737e (patch) | |
tree | 90a71801d84a4c0a019e072a953299bbc0a2962d /packages/markdown/marked/docs/demo/worker.js | |
parent | a6d702d1ab9906898dab4cacec735043e5618fb1 (diff) | |
download | wekan-2b26bbe78a1a2b8b427963a6c44c3853efdb737e.tar.gz wekan-2b26bbe78a1a2b8b427963a6c44c3853efdb737e.tar.bz2 wekan-2b26bbe78a1a2b8b427963a6c44c3853efdb737e.zip |
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
Diffstat (limited to 'packages/markdown/marked/docs/demo/worker.js')
-rw-r--r-- | packages/markdown/marked/docs/demo/worker.js | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/markdown/marked/docs/demo/worker.js b/packages/markdown/marked/docs/demo/worker.js index 06b8befe..6a0fa032 100644 --- a/packages/markdown/marked/docs/demo/worker.js +++ b/packages/markdown/marked/docs/demo/worker.js @@ -1,4 +1,4 @@ -/* globals marked, unfetch, ES6Promise */ +/* globals marked, unfetch, ES6Promise, Promise */ // eslint-disable-line no-redeclare if (!self.Promise) { self.importScripts('https://cdn.jsdelivr.net/npm/es6-promise/dist/es6-promise.js'); self.Promise = ES6Promise; @@ -11,15 +11,15 @@ if (!self.fetch) { var versionCache = {}; var currentVersion; -onunhandledrejection = function (e) { +onunhandledrejection = function(e) { throw e.reason; }; -onmessage = function (e) { +onmessage = function(e) { if (e.data.version === currentVersion) { parse(e); } else { - loadVersion(e.data.version).then(function () { + loadVersion(e.data.version).then(function() { parse(e); }); } @@ -87,13 +87,13 @@ function loadVersion(ver) { promise = Promise.resolve(versionCache[ver]); } else { promise = fetch(ver) - .then(function (res) { return res.text(); }) - .then(function (text) { + .then(function(res) { return res.text(); }) + .then(function(text) { versionCache[ver] = text; return text; }); } - return promise.then(function (text) { + return promise.then(function(text) { try { // eslint-disable-next-line no-new-func Function(text)(); |