gitlab-org--gitlab-foss/app/assets/javascripts/render_gfm.js
Rémy Coutable 97793a1616 Harmonize CE and EE JS code
Signed-off-by: Rémy Coutable <remy@rymai.me>
2018-02-22 13:34:35 +01:00

16 lines
487 B
JavaScript

import renderMath from './render_math';
import renderMermaid from './render_mermaid';
import syntaxHighlight from './syntax_highlight';
// Render Gitlab flavoured Markdown
//
// Delegates to syntax highlight and render math & mermaid diagrams.
//
$.fn.renderGFM = function renderGFM() {
syntaxHighlight(this.find('.js-syntax-highlight'));
renderMath(this.find('.js-render-math'));
renderMermaid(this.find('.js-render-mermaid'));
return this;
};
$(() => $('body').renderGFM());