summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/render_gfm.js
blob: bcdc0fd67b8ed4923d0fe91bfb4c09337e1580d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
/* 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
//
(function() {
  $.fn.renderGFM = function() {
    this.find('.js-syntax-highlight').syntaxHighlight();
    this.find('.js-render-math').renderMath();
    return this;
  };

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