summaryrefslogtreecommitdiffstats
path: root/mdoc_html.c
diff options
context:
space:
mode:
Diffstat (limited to 'mdoc_html.c')
-rw-r--r--mdoc_html.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/mdoc_html.c b/mdoc_html.c
index bc3a9f06..5e08ab85 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1322,12 +1322,16 @@ mdoc_lk_pre(MDOC_ARGS)
punct = punct->next;
/* Link target and link text. */
+ descr = link->next;
+ if (descr == punct)
+ descr = link; /* no text */
t = print_otag(h, TAG_A, "cTh", "Lk", link->string);
- for (descr = link->next; descr != punct; descr = descr->next) {
+ do {
if (descr->flags & (NODE_DELIMC | NODE_DELIMO))
h->flags |= HTML_NOSPACE;
print_text(h, descr->string);
- }
+ descr = descr->next;
+ } while (descr != punct);
print_tagq(h, t);
/* Trailing punctuation. */