=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.239 retrieving revision 1.240 diff -u -p -r1.239 -r1.240 --- mandoc/mdoc_term.c 2012/07/08 16:52:20 1.239 +++ mandoc/mdoc_term.c 2012/07/08 22:49:29 1.240 @@ -1,7 +1,7 @@ -/* $Id: mdoc_term.c,v 1.239 2012/07/08 16:52:20 schwarze Exp $ */ +/* $Id: mdoc_term.c,v 1.240 2012/07/08 22:49:29 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons - * Copyright (c) 2010 Ingo Schwarze + * Copyright (c) 2010, 2012 Ingo Schwarze * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -2159,25 +2159,24 @@ termp_li_pre(DECL_ARGS) static int termp_lk_pre(DECL_ARGS) { - const struct mdoc_node *nn, *sv; + const struct mdoc_node *link, *descr; - term_fontpush(p, TERMFONT_UNDER); + if (NULL == (link = n->child)) + return(0); - nn = sv = n->child; + if (NULL != (descr = link->next)) { + term_fontpush(p, TERMFONT_UNDER); + while (NULL != descr) { + term_word(p, descr->string); + descr = descr->next; + } + p->flags |= TERMP_NOSPACE; + term_word(p, ":"); + term_fontpop(p); + } - if (NULL == nn || NULL == nn->next) - return(1); - - for (nn = nn->next; nn; nn = nn->next) - term_word(p, nn->string); - - term_fontpop(p); - - p->flags |= TERMP_NOSPACE; - term_word(p, ":"); - term_fontpush(p, TERMFONT_BOLD); - term_word(p, sv->string); + term_word(p, link->string); term_fontpop(p); return(0);