Commit 6572c7ee authored by Shenghou Ma's avatar Shenghou Ma Committed by Andrew Gerrand

doc/godoc.js: assign tmp. id to nodes without id in generateTOC()

R=adg
CC=golang-dev
https://golang.org/cl/6604062
parent 7e196d08
......@@ -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 = $('<a/>').attr('href', '#' + node.id).text($(node).text());
var item;
if ($(node).is('h2')) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment