diff --git a/doc/godocs.js b/doc/godocs.js index 8d4a8aab821..7449efc2286 100644 --- a/doc/godocs.js +++ b/doc/godocs.js @@ -58,6 +58,8 @@ function generateTOC() { var toc_items = []; $(nav).nextAll('h2, h3').each(function() { var node = this; + if (node.id == '') + node.id = 'tmp_' + toc_items.length; var link = $('').attr('href', '#' + node.id).text($(node).text()); var item; if ($(node).is('h2')) {