-/* $Id: mdoc_html.c,v 1.339 2020/04/18 20:40:10 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.340 2020/04/19 15:16:56 schwarze Exp $ */
/*
* Copyright (c) 2014-2020 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
{
char *id;
- if ((id = html_make_id(n, 1)) != NULL)
+ if ((id = html_make_id(n, 1)) != NULL) {
print_tagq(h, print_otag(h, TAG_MARK, "i", id));
+ free(id);
+ }
return 0;
}
static int
mdoc_pp_pre(MDOC_ARGS)
{
+ char *id;
+
if (n->flags & NODE_NOFILL) {
print_endline(h);
if (n->flags & NODE_ID)
}
} else {
html_close_paragraph(h);
- print_otag(h, TAG_P, "ci", "Pp",
- n->flags & NODE_ID ? html_make_id(n, 1) : NULL);
+ id = n->flags & NODE_ID ? html_make_id(n, 1) : NULL;
+ print_otag(h, TAG_P, "ci", "Pp", id);
+ free(id);
}
return 0;
}