summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKristaps Dzonsons <kristaps@bsd.lv>2010-08-09 00:00:37 +0000
committerKristaps Dzonsons <kristaps@bsd.lv>2010-08-09 00:00:37 +0000
commit1ddd9daa02a7fa9f1cb855ad60101e64f8bd8b36 (patch)
tree67a82d21cde2e4743b0953a10c95503899f1f554
parent5bbc504b836790e7b924111614880b47f00e53ce (diff)
downloadmandoc-1ddd9daa02a7fa9f1cb855ad60101e64f8bd8b36.tar.gz
Correctly print `Lk' arguments in -Tascii. Issue raised by Aldis Berzoja.
Behaviour ok'd by schwarze@.
-rw-r--r--mdoc_term.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/mdoc_term.c b/mdoc_term.c
index 40f63208..55d5d1e8 100644
--- a/mdoc_term.c
+++ b/mdoc_term.c
@@ -2119,23 +2119,25 @@ termp_li_pre(DECL_ARGS)
static int
termp_lk_pre(DECL_ARGS)
{
- const struct mdoc_node *nn;
+ const struct mdoc_node *nn, *sv;
term_fontpush(p, TERMFONT_UNDER);
- nn = n->child;
+
+ nn = sv = n->child;
if (NULL == nn->next)
return(1);
- term_word(p, nn->string);
+ 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);
- for (nn = nn->next; nn; nn = nn->next)
- term_word(p, nn->string);
+ term_word(p, sv->string);
term_fontpop(p);
return(0);