From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from localhost (fantadrom.bsd.lv [local]) by fantadrom.bsd.lv (OpenSMTPD) with ESMTPA id d1978227 for ; Mon, 19 Jun 2017 07:57:38 -0500 (EST) Date: Mon, 19 Jun 2017 07:57:38 -0500 (EST) Message-Id: <2722590648602872872.enqueue@fantadrom.bsd.lv> X-Mailinglist: mdocml-source Reply-To: source@mdocml.bsd.lv MIME-Version: 1.0 From: schwarze@mdocml.bsd.lv To: source@mdocml.bsd.lv Subject: mdocml: Fix a regression in the previous revision: When there is no link X-Mailer: activitymail 1.26, http://search.cpan.org/dist/activitymail/ Content-Type: text/plain; charset=utf-8 Log Message: ----------- Fix a regression in the previous revision: When there is no link description, reuse the URI. Reported by tj@ and bentley@. Modified Files: -------------- mdocml: mdoc_html.c Revision Data ------------- Index: mdoc_html.c =================================================================== RCS file: /home/cvs/mdocml/mdocml/mdoc_html.c,v retrieving revision 1.289 retrieving revision 1.290 diff -Lmdoc_html.c -Lmdoc_html.c -u -p -r1.289 -r1.290 --- mdoc_html.c +++ 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. */ -- To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv