aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/html.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-03-13 19:01:38 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-03-13 19:01:38 +0000
commitaf8e9b53dadd9b8aec07d9fb7e442246b097e182 (patch)
tree9503912bc121a7cfc08085298daab57c60f887c0 /html.c
parent6b374f6daa4d35d28de14bf185c19df2bcf3a02d (diff)
downloadmandoc-af8e9b53dadd9b8aec07d9fb7e442246b097e182.tar.gz
mandoc-af8e9b53dadd9b8aec07d9fb7e442246b097e182.tar.zst
mandoc-af8e9b53dadd9b8aec07d9fb7e442246b097e182.zip
Print title="..." in addition to id="..." attributes for macro keys
that can be searched for by apropos(1), such that you see the semantic function in a tooltip when hovering with the mouse.
Diffstat (limited to 'html.c')
-rw-r--r--html.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/html.c b/html.c
index 40f2cc07..95df14ea 100644
--- a/html.c
+++ b/html.c
@@ -1,4 +1,4 @@
-/* $Id: html.c,v 1.207 2017/02/05 20:22:04 schwarze Exp $ */
+/* $Id: html.c,v 1.208 2017/03/13 19:01:38 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2011-2015, 2017 Ingo Schwarze <schwarze@openbsd.org>
@@ -534,18 +534,25 @@ print_otag(struct html *h, enum htmltag tag, const char *fmt, ...)
print_byte(h, '=');
print_byte(h, '"');
switch (*fmt) {
- case 'M':
- print_href(h, arg1, arg2, 1);
- fmt++;
- break;
case 'I':
print_href(h, arg1, NULL, 0);
fmt++;
break;
+ case 'M':
+ print_href(h, arg1, arg2, 1);
+ fmt++;
+ break;
case 'R':
print_byte(h, '#');
+ print_encode(h, arg1, NULL, 1);
fmt++;
- /* FALLTHROUGH */
+ break;
+ case 'T':
+ print_encode(h, arg1, NULL, 1);
+ print_word(h, "\" title=\"");
+ print_encode(h, arg1, NULL, 1);
+ fmt++;
+ break;
default:
print_encode(h, arg1, NULL, 1);
break;