We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 976cfb3 commit a9295d7Copy full SHA for a9295d7
ghdoc.go
@@ -167,8 +167,8 @@ func (doc *GHDoc) GrabToc() *GHToc {
167
}
168
169
func (doc *GHDoc) tocEntry(indent string, hdr Header) string {
170
- // TODO(chuck): Calculate the repeat count with the doc.StartDepth
171
- return strings.Repeat(indent, int(hdr.Depth)) + "* " +
+ indentDepth := int(hdr.Depth) - doc.StartDepth
+ return strings.Repeat(indent, indentDepth) + "* " +
172
"[" + doc.tocName(hdr.Name) + "]" +
173
"(" + doc.tocLink(hdr.Href) + ")"
174
0 commit comments