Welcome to mirror list, hosted at ThFree Co, Russian Federation.

render_gfm.js « javascripts « assets « app - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: bf6fc0ec30568e2e540e3fdf725daa1cec453e2d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
/* eslint-disable func-names, space-before-function-paren, consistent-return, no-var, no-else-return, prefer-arrow-callback, max-len */

// 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;
  };

  $(() => $('body').renderGFM());
}).call(window);