=================================================================== RCS file: /cvs/mandoc/mdoc_macro.c,v retrieving revision 1.107 retrieving revision 1.108 diff -u -p -r1.107 -r1.108 --- mandoc/mdoc_macro.c 2011/04/19 16:38:48 1.107 +++ mandoc/mdoc_macro.c 2011/04/25 00:03:07 1.108 @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.107 2011/04/19 16:38:48 kristaps Exp $ */ +/* $Id: mdoc_macro.c,v 1.108 2011/04/25 00:03:07 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010 Kristaps Dzonsons * Copyright (c) 2010 Ingo Schwarze @@ -600,7 +600,19 @@ dword(struct mdoc *m, int line, if (DELIM_OPEN == d) m->last->flags |= MDOC_DELIMO; - else if (DELIM_CLOSE == d) + + /* + * Closing delimiters only suppress the preceding space + * when they follow something, not when they start a new + * block or element, and not when they follow `No'. + * + * XXX Explicitly special-casing MDOC_No here feels + * like a layering violation. Find a better way + * and solve this in the code related to `No'! + */ + + else if (DELIM_CLOSE == d && m->last->prev && + m->last->prev->tok != MDOC_No) m->last->flags |= MDOC_DELIMC; return(1);