This repository has been archived on 2023-07-11. You can view files and clone it, but cannot push or open issues or pull requests.
blarg/resources/public/js/site.js

20 lines
599 B
JavaScript
Raw Normal View History

2013-05-20 17:43:38 -04:00
$(document).ready(function() {
var code = $('div.content[role="main"]').find('pre');
code.each(function() {
var pre = $(this);
// markdown-clj sets up <pre> tags for use with another syntax highlighting lib that we're
// not using. so we need to convert some css classes to work with Prettify
pre.removeClass('brush:');
var languageHint = pre.attr('class'); // should be the only class left at this point
var classAttr = 'prettyprint';
if (languageHint && languageHint.length > 0)
classAttr += ' lang-' + languageHint;
pre.attr('class', classAttr);
});
2013-05-20 17:43:38 -04:00
prettyPrint();
});