-/* $OpenBSD: html.c,v 1.146 2021/09/09 14:45:18 schwarze Exp $ */
+/* $OpenBSD: html.c,v 1.147 2022/06/24 11:15:19 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2015, 2017-2021 Ingo Schwarze <schwarze@openbsd.org>
{"body", HTML_NLALL},
{"div", HTML_NLAROUND},
{"section", HTML_NLALL},
+ {"nav", HTML_NLALL},
{"table", HTML_NLALL | HTML_INDENT},
{"tr", HTML_NLALL | HTML_INDENT},
{"td", HTML_NLAROUND},
case 'i':
attr = "id";
break;
+ case 'r':
+ attr = "role";
+ break;
case '?':
attr = arg1;
arg1 = va_arg(ap, char *);
-/* $OpenBSD: html.h,v 1.71 2021/09/09 14:45:18 schwarze Exp $ */
+/* $OpenBSD: html.h,v 1.72 2022/06/24 11:15:19 schwarze Exp $ */
/*
* Copyright (c) 2017, 2018, 2019, 2020 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
TAG_BODY,
TAG_DIV,
TAG_SECTION,
+ TAG_NAV,
TAG_TABLE,
TAG_TR,
TAG_TD,
-/* $OpenBSD: mdoc_html.c,v 1.217 2021/03/30 19:23:50 schwarze Exp $ */
+/* $OpenBSD: mdoc_html.c,v 1.218 2022/06/24 11:15:19 schwarze Exp $ */
/*
* Copyright (c) 2014-2021 Ingo Schwarze <schwarze@openbsd.org>
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
mdoc_sh_pre(MDOC_ARGS)
{
struct roff_node *sn, *subn;
- struct tag *t, *tsec, *tsub;
+ struct tag *t, *tnav, *tsec, *tsub;
char *id;
int sc;
break;
if (sc < 2)
break;
+ tnav = print_otag(h, TAG_NAV, "r", "doc-toc");
t = print_otag(h, TAG_H1, "c", "Sh");
print_text(h, "TABLE OF CONTENTS");
print_tagq(h, t);
}
print_tagq(h, tsec);
}
- print_tagq(h, t);
+ print_tagq(h, tnav);
print_otag(h, TAG_SECTION, "c", "Sh");
break;
case ROFFT_HEAD: