=================================================================== RCS file: /cvs/mandoc/mdoc_term.c,v retrieving revision 1.172 retrieving revision 1.175 diff -u -p -r1.172 -r1.175 --- mandoc/mdoc_term.c 2010/07/06 10:54:05 1.172 +++ mandoc/mdoc_term.c 2010/07/19 11:06:31 1.175 @@ -1,4 +1,4 @@ -/* $Id: mdoc_term.c,v 1.172 2010/07/06 10:54:05 kristaps Exp $ */ +/* $Id: mdoc_term.c,v 1.175 2010/07/19 11:06:31 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -31,7 +31,6 @@ #include "mandoc.h" #include "out.h" #include "term.h" -#include "regs.h" #include "mdoc.h" #include "chars.h" #include "main.h" @@ -1906,6 +1905,11 @@ termp_sp_pre(DECL_ARGS) len = 0; break; default: + assert(n->parent); + if ((NULL == n->next || NULL == n->prev) && + (MDOC_Ss == n->parent->tok || + MDOC_Sh == n->parent->tok)) + return(0); len = 1; break; } @@ -2067,9 +2071,11 @@ termp_sm_pre(DECL_ARGS) { assert(n->child && MDOC_TEXT == n->child->type); - if (0 == strcmp("on", n->child->string)) + if (0 == strcmp("on", n->child->string)) { + if (p->col) + p->flags &= ~TERMP_NOSPACE; p->flags &= ~TERMP_NONOSPACE; - else + } else p->flags |= TERMP_NONOSPACE; return(0);