=================================================================== RCS file: /cvs/mandoc/man_macro.c,v retrieving revision 1.128 retrieving revision 1.129 diff -u -p -r1.128 -r1.129 --- mandoc/man_macro.c 2018/08/18 02:08:27 1.128 +++ mandoc/man_macro.c 2018/08/18 14:02:56 1.129 @@ -1,4 +1,4 @@ -/* $Id: man_macro.c,v 1.128 2018/08/18 02:08:27 schwarze Exp $ */ +/* $Id: man_macro.c,v 1.129 2018/08/18 14:02:56 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2012-2015, 2017, 2018 Ingo Schwarze @@ -71,7 +71,7 @@ static const struct man_macro man_macros[MAN_MAX - MAN { 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 */ @@ -269,6 +269,13 @@ blk_close(MACRO_PROT_ARGS) if (ctok == MAN_LP || ctok == MAN_PP || ctok == MAN_P) { *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); } }