diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-09-04 21:25:00 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-09-04 21:25:00 +0000 |
commit | 41352abb31bca3448fdf6a656c79fb4986624085 (patch) | |
tree | c5be5c34a1ae5085a012f5b17c63af239cdd6def /man.c | |
parent | 1bca1b26aa408603e89d1a896729319ba8f93084 (diff) | |
download | mandoc-41352abb31bca3448fdf6a656c79fb4986624085.tar.gz |
Fill mode changes don't break next-line scope in all cases,
in particular not for tagged paragraphs.
Issue found by Christian Neukirchen <chneukirchen at gmail dot com>
in the exiv2(1) manual page.
Diffstat (limited to 'man.c')
-rw-r--r-- | man.c | 14 |
1 files changed, 14 insertions, 0 deletions
@@ -283,6 +283,20 @@ man_breakscope(struct roff_man *man, int tok) } /* + * Weird special case: + * Switching fill mode closes section headers. + */ + + if (man->flags & MAN_BLINE && + (tok == MAN_nf || tok == MAN_fi) && + (man->last->tok == MAN_SH || man->last->tok == MAN_SS)) { + n = man->last; + man_unscope(man, n); + roff_body_alloc(man, n->line, n->pos, n->tok); + man->flags &= ~MAN_BLINE; + } + + /* * A block header next line scope is open, * and the new macro is not allowed inside block headers. * Delete the block that is being broken. |