gitlab-org--gitlab-foss/app/assets/javascripts/render_gfm.js

18 lines
502 B
JavaScript
Raw Normal View History

2017-03-17 13:21:25 -04:00
/* 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;
};
2017-01-13 16:54:16 -05:00
$(document).on('ready load', function() {
return $('body').renderGFM();
});
}).call(window);