=================================================================== RCS file: /cvs/mandoc/mdoc_macro.c,v retrieving revision 1.106 retrieving revision 1.108 diff -u -p -r1.106 -r1.108 --- mandoc/mdoc_macro.c 2011/03/22 14:33:05 1.106 +++ mandoc/mdoc_macro.c 2011/04/25 00:03:07 1.108 @@ -1,4 +1,4 @@ -/* $Id: mdoc_macro.c,v 1.106 2011/03/22 14:33:05 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); @@ -618,7 +630,7 @@ append_delims(struct mdoc *m, int line, int *pos, char for (;;) { la = *pos; - ac = mdoc_zargs(m, line, pos, buf, ARGS_NOWARN, &p); + ac = mdoc_zargs(m, line, pos, buf, &p); if (ARGS_ERROR == ac) return(0); @@ -1717,7 +1729,7 @@ phrase(struct mdoc *m, int line, int ppos, char *buf) for (pos = ppos; ; ) { la = pos; - ac = mdoc_zargs(m, line, &pos, buf, 0, &p); + ac = mdoc_zargs(m, line, &pos, buf, &p); if (ARGS_ERROR == ac) return(0); @@ -1762,7 +1774,7 @@ phrase_ta(MACRO_PROT_ARGS) for (;;) { la = *pos; - ac = mdoc_zargs(m, line, pos, buf, 0, &p); + ac = mdoc_zargs(m, line, pos, buf, &p); if (ARGS_ERROR == ac) return(0);