-/* $Id: mdoc_term.c,v 1.179 2010/07/27 08:38:04 kristaps Exp $ */
+/* $Id: mdoc_term.c,v 1.183 2010/08/21 14:04:13 schwarze Exp $ */
/*
* Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2010 Ingo Schwarze <schwarze@openbsd.org>
p->rmargin = p->maxrmargin = TERM_MAXMARGIN;
for (nn = n->child; nn; nn = nn->next) {
- if (nn->prev && nn->prev->line < nn->line)
- term_newln(p);
print_mdoc_node(p, pair, m, nn);
+ if (nn->next && nn->next->line == nn->line)
+ continue;
+ term_flushln(p);
+ p->flags |= TERMP_NOSPACE;
}
p->tabwidth = tabwidth;
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);