From 4fe082dae51b8658b571fd06b8f39737874a7eaa Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 18 Aug 2018 14:02:56 +0000 Subject: Two consecutive .SY blocks only get a blank line in between if the first one is explicitly closed with .YS. --- man_macro.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'man_macro.c') diff --git a/man_macro.c b/man_macro.c index cbde3faa..c54f726e 100644 --- a/man_macro.c +++ b/man_macro.c @@ -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_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 -- cgit v1.2.3