Fix anchors for TOC headers
This commit is contained in:
parent
7cacf7db36
commit
caf7c5e336
1 changed files with 4 additions and 4 deletions
|
@ -278,11 +278,11 @@ rndr_header(struct buf *ob, struct buf *text, int level, void *opaque)
|
|||
if (ob->size)
|
||||
bufputc(ob, '\n');
|
||||
|
||||
if (options->flags & HTML_TOC) {
|
||||
bufprintf(ob, "<a name=\"toc_%d\"></a>", options->toc_data.header_count++);
|
||||
}
|
||||
if (options->flags & HTML_TOC)
|
||||
bufprintf(ob, "<h%d id=\"toc_%d\"></a>", level, options->toc_data.header_count++);
|
||||
else
|
||||
bufprintf(ob, "<h%d>", level);
|
||||
|
||||
bufprintf(ob, "<h%d>", level);
|
||||
if (text) bufput(ob, text->data, text->size);
|
||||
bufprintf(ob, "</h%d>\n", level);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue