diff options
author | 2020-04-18 20:28:46 +0000 | |
---|---|---|
committer | 2020-04-18 20:28:46 +0000 | |
commit | 6e2a0df93b26b20049df54aff0406fb853fa3e0b (patch) | |
tree | 0af4686781ea4e362a8df80a51519cbd4367f0b7 /usr.bin/mandoc/mdoc_html.c | |
parent | SPI_SA(sa, NULL) already prints a colon. (diff) | |
download | wireguard-openbsd-6e2a0df93b26b20049df54aff0406fb853fa3e0b.tar.xz wireguard-openbsd-6e2a0df93b26b20049df54aff0406fb853fa3e0b.zip |
When a .Tg is attached to a paragraph, attach the permalink
to the first word, or the first few words if they are short.
Diffstat (limited to 'usr.bin/mandoc/mdoc_html.c')
-rw-r--r-- | usr.bin/mandoc/mdoc_html.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index d55cb75d0ca..4a277cbc72a 100644 --- a/usr.bin/mandoc/mdoc_html.c +++ b/usr.bin/mandoc/mdoc_html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_html.c,v 1.213 2020/04/06 09:55:49 schwarze Exp $ */ +/* $OpenBSD: mdoc_html.c,v 1.214 2020/04/18 20:28:46 schwarze Exp $ */ /* * Copyright (c) 2014-2020 Ingo Schwarze <schwarze@openbsd.org> * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> @@ -375,10 +375,13 @@ print_mdoc_node(MDOC_ARGS) } t = h->tag; t->refcnt++; - if (NODE_DELIMC & n->flags) + if (n->flags & NODE_DELIMC) h->flags |= HTML_NOSPACE; - print_text(h, n->string); - if (NODE_DELIMO & n->flags) + if (n->flags & NODE_HREF) + print_tagged_text(h, n->string, n); + else + print_text(h, n->string); + if (n->flags & NODE_DELIMO) h->flags |= HTML_NOSPACE; break; case ROFFT_EQN: |