summaryrefslogtreecommitdiffstats
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
commit678985f6229abc8d83c11bde4fca2979cfa47f55 (patch)
treeafd46c172fc6da769937c122f10927201b748353 /html.c
parentccb27794cbdefbc04414c1655e968cc5cb7a914a (diff)
downloadmandoc-678985f6229abc8d83c11bde4fca2979cfa47f55.tar.gz
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.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/html.c b/html.c
index c1ccf643..ea21d49f 100644
--- a/html.c
+++ b/html.c
@@ -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;