diff options
author | Phil Hughes <me@iamphill.com> | 2017-11-22 18:22:15 +0000 |
---|---|---|
committer | Phil Hughes <me@iamphill.com> | 2017-11-22 18:22:15 +0000 |
commit | 1374da4ca90ab1f8a0f539a2a95a45a1a2d1de14 (patch) | |
tree | 047ec44631d284bab18b16c3a6b4c1d4e6b88889 | |
parent | 48b65bb0ef5b7e70229491464bf69d910c27ed63 (diff) | |
download | gitlab-ce-1374da4ca90ab1f8a0f539a2a95a45a1a2d1de14.tar.gz |
Fixed import of render mermaid & render math methods
-rw-r--r-- | app/assets/javascripts/main.js | 2 | ||||
-rw-r--r-- | app/assets/javascripts/render_gfm.js | 19 |
2 files changed, 9 insertions, 12 deletions
diff --git a/app/assets/javascripts/main.js b/app/assets/javascripts/main.js index d908452399c..08e326cba9c 100644 --- a/app/assets/javascripts/main.js +++ b/app/assets/javascripts/main.js @@ -69,8 +69,6 @@ import './project_import'; import './projects_dropdown'; import './projects_list'; import './syntax_highlight'; -import './render_math'; -import './render_mermaid'; import './render_gfm'; import './right_sidebar'; import './search'; diff --git a/app/assets/javascripts/render_gfm.js b/app/assets/javascripts/render_gfm.js index bf6fc0ec305..cb935a6bea8 100644 --- a/app/assets/javascripts/render_gfm.js +++ b/app/assets/javascripts/render_gfm.js @@ -1,16 +1,15 @@ -/* eslint-disable func-names, space-before-function-paren, consistent-return, no-var, no-else-return, prefer-arrow-callback, max-len */ +import './render_math'; +import './render_mermaid'; // Render Gitlab flavoured Markdown // // Delegates to syntax highlight and render math & mermaid diagrams. // -(function() { - $.fn.renderGFM = function() { - this.find('.js-syntax-highlight').syntaxHighlight(); - this.find('.js-render-math').renderMath(); - this.find('.js-render-mermaid').renderMermaid(); - return this; - }; +$.fn.renderGFM = function renderGFM() { + this.find('.js-syntax-highlight').syntaxHighlight(); + this.find('.js-render-math').renderMath(); + this.find('.js-render-mermaid').renderMermaid(); + return this; +}; - $(() => $('body').renderGFM()); -}).call(window); +$(() => $('body').renderGFM()); |