Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

TOC should only show link name, fixes #62.

  • Loading branch information...
commit 76a86ff5463cbead2a3e4177f069a0044ab5ef4d 1 parent 3361ebc
@gregleaver gregleaver authored
Showing with 9 additions and 1 deletion.
  1. +9 −1 html/html.c
View
10 html/html.c
@@ -513,6 +513,14 @@ toc_header(struct buf *ob, const struct buf *text, int level, void *opaque)
BUFPUTSL(ob, "</a>\n");
}
+static int
+toc_link(struct buf *ob, const struct buf *link, const struct buf *title, const struct buf *content, void *opaque)
+{
+ if (content && content->size)
+ bufput(ob, content->data, content->size);
+ return 1;
+}
+
static void
toc_finalize(struct buf *ob, void *opaque)
{
@@ -546,7 +554,7 @@ sdhtml_toc_renderer(struct sd_callbacks *callbacks, struct html_renderopt *optio
rndr_emphasis,
NULL,
NULL,
- NULL,
+ toc_link,
NULL,
rndr_triple_emphasis,
rndr_strikethrough,
Please sign in to comment.
Something went wrong with that request. Please try again.