diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2011-04-25 00:03:07 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2011-04-25 00:03:07 +0000 |
commit | 13c1e4180c0b62435638915638f5b2c6163527eb (patch) | |
tree | 3b2a38a080a07e39cfb4bfd341845e31ad2204aa /mdoc_macro.c | |
parent | 62a48c322e3776d78c00f91cddca122e733deaee (diff) | |
download | mandoc-13c1e4180c0b62435638915638f5b2c6163527eb.tar.gz |
Closing delimiters only suppress spacing when they follow something.
Fixing a regression introduced in rev. 1.105.
ok and prodding for comments kristaps@.
Diffstat (limited to 'mdoc_macro.c')
-rw-r--r-- | mdoc_macro.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/mdoc_macro.c b/mdoc_macro.c index 5fc88916..62cc5cd4 100644 --- a/mdoc_macro.c +++ b/mdoc_macro.c @@ -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); |