diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-03 15:55:24 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-06-03 15:55:24 +0000 |
commit | 90897efbceb54855c1943f8e19d5bba5a542ff65 (patch) | |
tree | e2c70156dcf82c5d21e24e9dda0d94d0cb1a26f2 /man.c | |
parent | 3248b177a4b5624bb57796f898b81736244d2579 (diff) | |
download | mandoc-90897efbceb54855c1943f8e19d5bba5a542ff65.tar.gz |
ignore blank lines in man(7) next line scope;
strange groff edge case behaviour found in multimedia/mjpegtools
Diffstat (limited to 'man.c')
-rw-r--r-- | man.c | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -89,14 +89,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; |