lib/rdoc/generator/template/rails/resources/js/main.js in sdoc-0.4.1 vs lib/rdoc/generator/template/rails/resources/js/main.js in sdoc-0.4.2

- old
+ new

@@ -1,17 +1,16 @@ -function toggleSource(id) -{ +function toggleSource(id) { var src = $('#' + id).toggle(); var isVisible = src.is(':visible'); $('#l_' + id).html(isVisible ? 'hide' : 'show'); } window.highlight = function(url) { - var hash = url.match(/#([^#]+)$/) - if(hash) { - $('a[name=' + hash[1] + ']').parent().effect('highlight', {}, 'slow') + var hash = url.match(/#([^#]+)$/); + if (hash) { + $('a[name=' + hash[1] + ']').parent().effect('highlight', {}, 'slow'); } -} +}; $(function() { highlight('#' + location.hash); $('.description pre').each(function() { hljs.highlightBlock(this);