diff options
Diffstat (limited to 'app/assets/javascripts')
-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()); |