diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2017-05-09 14:10:01 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2017-05-09 14:10:01 +0000 |
commit | 39734eb01d30f4fff1da35538dbe086698bf9d43 (patch) | |
tree | 47c9e25683b72c07539a59eb76cf93604b8e9578 /man_term.c | |
parent | b07175c583be6f4b4733c49a5e4e855490ea5191 (diff) | |
download | mandoc-39734eb01d30f4fff1da35538dbe086698bf9d43.tar.gz mandoc-39734eb01d30f4fff1da35538dbe086698bf9d43.tar.zst mandoc-39734eb01d30f4fff1da35538dbe086698bf9d43.zip |
Trailing \c suppresses the output line break even if
the next line is a text line starting with whitespace.
Quirk found in the sysutils/rancid port.
Diffstat (limited to 'man_term.c')
-rw-r--r-- | man_term.c | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.199 2017/05/07 21:44:49 schwarze Exp $ */ +/* $Id: man_term.c,v 1.200 2017/05/09 14:10:01 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015, 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -873,10 +873,11 @@ print_man_node(DECL_ARGS) * If we have a space as the first character, break * before printing the line's data. */ - if ('\0' == *n->string) { + if (*n->string == '\0') { term_vspace(p); return; - } else if (' ' == *n->string && NODE_LINE & n->flags) + } else if (*n->string == ' ' && n->flags & NODE_LINE && + (p->flags & TERMP_NONEWLINE) == 0) term_newln(p); term_word(p, n->string); |