<div id="module-funcs"></div>

<script>
    jQuery.fn.local_toc = function(tgt_sel) {
        var tgt = jQuery(tgt_sel);

        tgt.append('<h4>Table of Contents</h4>');

        jQuery('dt .headerlink').each(function(idx, elem) {

            var i = [
                '<li><a href="', elem.href, '">',
                last(elem.href.split('.')),
                '</a></li>']
            .join('');

            tgt.append(i);
        });

        function last(list) {
            return list[list.length - 1];
        }
    };
</script>

<script>
;(function($) {
    $.fn.local_toc('#module-funcs');
})(jQuery);
</script>

<div id="module-funcs"></div>

<script>
    jQuery.fn.local_toc = function(tgt_sel) {
        var tgt = jQuery(tgt_sel);

        tgt.append('<h4>Table of Contents</h4>');

        tgt.append('<ul>');
        jQuery('dt .headerlink').each(function(idx, elem) {

            var i = [
                '<li><a href="', elem.href, '">',
                last(elem.href.split('.')),
                '</a></li>']
            .join('');

            tgt.append(i);
        });
        tgt.append('</ul>');

        function last(list) {
            return list[list.length - 1];
        }
    };
</script>

<script>
;(function($) {
    $.fn.local_toc('#module-funcs');
})(jQuery);
</script>

Add missing <ul>[…]</ul> around list elements in sidebar TOC.
Add missing <ul>[…]</ul> around list elements in sidebar TOC.
