debian-mirror-gitlab/app/assets/javascripts/syntax_highlight.js
2016-09-13 17:45:13 +05:30

18 lines
466 B
JavaScript

(function() {
$.fn.syntaxHighlight = function() {
var $children;
if ($(this).hasClass('js-syntax-highlight')) {
return $(this).addClass(gon.user_color_scheme);
} else {
$children = $(this).find('.js-syntax-highlight');
if ($children.length) {
return $children.syntaxHighlight();
}
}
};
$(document).on('ready page:load', function() {
return $('.js-syntax-highlight').syntaxHighlight();
});
}).call(this);