diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-03-08 16:22:04 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-03-08 16:22:04 +0000 |
commit | 2afc19291f2b386a1d2d38096a53b25487d9a744 (patch) | |
tree | 59b3b28e098466428c0814ac2aa6a439c1dde9ae | |
parent | 49fc5b876caef96271d1484f9279fd423d9b04ff (diff) | |
download | mandoc-2afc19291f2b386a1d2d38096a53b25487d9a744.tar.gz mandoc-2afc19291f2b386a1d2d38096a53b25487d9a744.tar.zst mandoc-2afc19291f2b386a1d2d38096a53b25487d9a744.zip |
In .nf mode, use the MAN_LINE flag to detect input line breaks
instead of the man_node line member. This is required to preserve
line breaks contained in user-defined macros called in .nf mode.
Found in a code audit triggered by fixing a similar issue in .TP.
-rw-r--r-- | man_term.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.141 2014/03/08 15:50:41 schwarze Exp $ */ +/* $Id: man_term.c,v 1.142 2014/03/08 16:22:04 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -1045,7 +1045,7 @@ out: * more specific than this. */ if (MANT_LITERAL & mt->fl && ! (TERMP_NOBREAK & p->flags) && - (NULL == n->next || n->next->line > n->line)) { + (NULL == n->next || MAN_LINE & n->next->flags)) { rm = p->rmargin; rmax = p->maxrmargin; p->rmargin = p->maxrmargin = TERM_MAXMARGIN; |