-/* $Id: mdoc_html.c,v 1.303 2018/05/21 01:11:31 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.304 2018/05/25 20:23:51 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014,2015,2016,2017,2018 Ingo Schwarze <schwarze@openbsd.org>
(n->parent->tok == MDOC_Xo &&
n->parent->parent->prev == NULL &&
n->parent->parent->parent->tok == MDOC_It)))
- return html_make_id(n);
+ return html_make_id(n, 1);
return NULL;
}
switch (n->type) {
case ROFFT_HEAD:
- id = html_make_id(n);
+ id = html_make_id(n, 1);
print_otag(h, TAG_H1, "cTi", "Sh", id);
if (id != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
- free(id);
break;
case ROFFT_BODY:
if (n->sec == SEC_AUTHORS)
if (n->type != ROFFT_HEAD)
return 1;
- id = html_make_id(n);
+ id = html_make_id(n, 1);
print_otag(h, TAG_H2, "cTi", "Ss", id);
if (id != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
- free(id);
return 1;
}
if ((id = cond_id(n)) != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
print_otag(h, TAG_CODE, "cTi", "Fl", id);
- free(id);
print_text(h, "\\-");
if (!(n->child == NULL &&
if ((id = cond_id(n)) != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
print_otag(h, TAG_CODE, "cTi", "Cm", id);
- free(id);
return 1;
}
{
char *id;
- id = html_make_id(n);
+ id = html_make_id(n, 0);
print_otag(h, TAG_A, "cThR", "Sx", id);
free(id);
return 1;
if ((id = cond_id(n)) != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
print_otag(h, TAG_CODE, "cTi", "Dv", id);
- free(id);
return 1;
}
if ((id = cond_id(n)) != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
print_otag(h, TAG_CODE, "cTi", "Ev", id);
- free(id);
return 1;
}
(n->parent->tok == MDOC_It ||
(n->parent->tok == MDOC_Bq &&
n->parent->parent->parent->tok == MDOC_It)) ?
- html_make_id(n) : NULL;
+ html_make_id(n, 1) : NULL;
if (id != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
print_otag(h, TAG_CODE, "cTi", "Er", id);
- free(id);
return 1;
}
if ((id = cond_id(n)) != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
print_otag(h, TAG_CODE, "cTi", "Ic", id);
- free(id);
return 1;
}
if ((id = cond_id(n)) != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
print_otag(h, TAG_SPAN, "cTi", "Ms", id);
- free(id);
return 1;
}
if ((id = cond_id(n)) != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
print_otag(h, TAG_SPAN, "ci", "No", id);
- free(id);
return 1;
}
if ((id = cond_id(n)) != NULL)
print_otag(h, TAG_A, "chR", "permalink", id);
print_otag(h, TAG_CODE, "ci", "Li", id);
- free(id);
return 1;
}