gitlab-org--gitlab-foss/app/assets/javascripts/render_gfm.js
Phil Hughes 554afea059
Fix race condition with dispatcher.js
The dispatcher was trying to create a new instance of a class that is loaded in a file after main.js which would cause the filtered search to not work on issues. This would only happen on the first load when the JS is not cached. If the JS is cached, then everything will be fine.
2017-08-15 16:09:36 +01:00

15 lines
452 B
JavaScript

/* 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);