mirror of
https://github.com/golang/go
synced 2024-11-22 04:14:42 -07:00
doc/godoc.js: assign tmp. id to nodes without id in generateTOC()
R=adg CC=golang-dev https://golang.org/cl/6604062
This commit is contained in:
parent
7e196d0822
commit
6572c7ee93
@ -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')) {
|
||||
|
Loading…
Reference in New Issue
Block a user