BigW Consortium Gitlab

render_gfm.js 438 Bytes
Newer Older
Phil Hughes committed
1 2
import renderMath from './render_math';
import renderMermaid from './render_mermaid';
3

4 5
// Render Gitlab flavoured Markdown
//
6
// Delegates to syntax highlight and render math & mermaid diagrams.
7
//
8 9
$.fn.renderGFM = function renderGFM() {
  this.find('.js-syntax-highlight').syntaxHighlight();
Phil Hughes committed
10 11
  renderMath(this.find('.js-render-math'));
  renderMermaid(this.find('.js-render-mermaid'));
12 13
  return this;
};
14

15
$(() => $('body').renderGFM());