diff options
Diffstat (limited to 'usr.bin/mandoc/man.c')
-rw-r--r-- | usr.bin/mandoc/man.c | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/usr.bin/mandoc/man.c b/usr.bin/mandoc/man.c index c89fe0789ee..ba7cdd8d386 100644 --- a/usr.bin/mandoc/man.c +++ b/usr.bin/mandoc/man.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man.c,v 1.121 2017/05/08 20:33:40 schwarze Exp $ */ +/* $OpenBSD: man.c,v 1.122 2017/06/03 15:54:09 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014, 2015, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -87,14 +87,15 @@ man_ptext(struct roff_man *man, int line, char *buf, int offs) /* Skip leading whitespace. */ ; /* - * Blank lines are ignored right after headings - * but add a single vertical space elsewhere. + * Blank lines are ignored in next line scope and right + * after headings but add a single vertical space elsewhere. */ if (buf[i] == '\0') { - man_breakscope(man, ROFF_sp); - /* Allocate a blank entry. */ - if (man->last->tok != MAN_SH && + if (man->flags & (MAN_ELINE | MAN_BLINE)) + mandoc_msg(MANDOCERR_BLK_BLANK, man->parse, + line, 0, NULL); + else if (man->last->tok != MAN_SH && man->last->tok != MAN_SS) { roff_elem_alloc(man, line, offs, ROFF_sp); man->next = ROFF_NEXT_SIBLING; |