diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2018-08-18 14:02:56 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2018-08-18 14:02:56 +0000 |
commit | 8a2246d97a01be2284b1f72fedf00c3e09f0db54 (patch) | |
tree | 21b30d81a1ed4fa577dc2f810ae04cb948ba6d10 /man_macro.c | |
parent | 192195d04a6561489b2a7994ba82a517daa265b5 (diff) | |
download | mandoc-8a2246d97a01be2284b1f72fedf00c3e09f0db54.tar.gz |
Two consecutive .SY blocks only get a blank line in between
if the first one is explicitly closed with .YS.
Diffstat (limited to 'man_macro.c')
-rw-r--r-- | man_macro.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/man_macro.c b/man_macro.c index 43249161..077e1264 100644 --- a/man_macro.c +++ b/man_macro.c @@ -71,7 +71,7 @@ static const struct man_macro man_macros[MAN_MAX - MAN_TH] = { { in_line_eoln, MAN_NSCOPED }, /* PD */ { in_line_eoln, 0 }, /* AT */ { in_line_eoln, MAN_NSCOPED }, /* in */ - { blk_exp, MAN_BSCOPE }, /* SY */ + { blk_imp, MAN_BSCOPE }, /* SY */ { blk_close, MAN_BSCOPE }, /* YS */ { in_line_eoln, 0 }, /* OP */ { in_line_eoln, MAN_BSCOPE }, /* EX */ @@ -270,6 +270,13 @@ blk_close(MACRO_PROT_ARGS) *pos = strlen(buf); blk_imp(man, ctok, cline, cpos, pos, buf); } + + /* Synopsis blocks need an explicit end marker for spacing. */ + + if (tok == MAN_YS && man->last == nn) { + roff_elem_alloc(man, line, ppos, tok); + man_unscope(man, man->last); + } } void |