- p->flags |= TERMP_NOSPACE | TERMP_NOBREAK | TERMP_HANG;
- p->rmargin = p->offset + term_len(p, 1) +
- (NULL == n->child ? term_strlen(p, m->name) :
- MDOC_TEXT == n->child->type ?
- term_strlen(p, n->child->string) :
- term_len(p, 5));
+ p->flags |= TERMP_NOSPACE | TERMP_NOBREAK;
+ p->rmargin = p->offset + term_len(p, 1);
+ if (NULL == n->child) {
+ p->rmargin += term_strlen(p, m->name);
+ } else if (MDOC_TEXT == n->child->type) {
+ p->rmargin += term_strlen(p, n->child->string);
+ if (n->child->next)
+ p->flags |= TERMP_HANG;
+ } else {
+ p->rmargin += term_len(p, 5);
+ p->flags |= TERMP_HANG;
+ }