? .foo.1.swp ? config.h ? config.log ? foo.1 ? foo.1.html ? foo.3 ? foo.7 ? foo.html ? mandoc ? patch.txt ? relayd.8 ? relayd.8.html ? spamd.8 ? ssh.1 ? ssh.1.html ? regress/output Index: mdoc_term.c =================================================================== RCS file: /usr/vhosts/mdocml.bsd.lv/cvs/mdocml/mdoc_term.c,v retrieving revision 1.171 diff -u -r1.171 mdoc_term.c --- mdoc_term.c 4 Jul 2010 22:04:04 -0000 1.171 +++ mdoc_term.c 5 Jul 2010 10:36:57 -0000 @@ -330,6 +330,23 @@ else if (termacts[n->tok].pre && ENDBODY_NOT == n->end) chld = (*termacts[n->tok].pre)(p, &npair, m, n); + /* + * Keeps only work until the end of a line. If a keep was + * invoked in a prior line, revert it to PREKEEP. + */ + + if (TERMP_KEEP & p->flags) { + if (n->prev && n->prev->line != n->line) { + p->flags &= ~TERMP_KEEP; + p->flags |= TERMP_PREKEEP; + } else if (NULL == n->prev) { + if (n->parent && n->parent->line != n->line) { + p->flags &= ~TERMP_KEEP; + p->flags |= TERMP_PREKEEP; + } + } + } + if (chld && n->child) print_mdoc_nodelist(p, &npair, m, n->child);