diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-08 07:13:11 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2014-04-08 07:13:11 +0000 |
commit | 54ecda87da2932c7457339c66a54bb18190a7306 (patch) | |
tree | 89b42b6079612358db9d0c25510517be13ec6fa5 /man_term.c | |
parent | afd2d83121837880082344a1125e3e44aa078d3e (diff) | |
download | mandoc-54ecda87da2932c7457339c66a54bb18190a7306.tar.gz mandoc-54ecda87da2932c7457339c66a54bb18190a7306.tar.zst mandoc-54ecda87da2932c7457339c66a54bb18190a7306.zip |
Add a new term_flushln() flag TERMP_BRIND (if break, then indent)
to control indentation of continuation lines in TERMP_NOBREAK mode.
In the past, this was always on; continue using it
for .Bl, .Nm, .Fn, .Fo, and .HP, but no longer for .IP and .TP.
I looked at this because sthen@ reported the issue in a manual
of a Perl module from ports, but it affects base, too: This patch
reduces groff-mandoc differences in base by more than 15%.
Diffstat (limited to 'man_term.c')
-rw-r--r-- | man_term.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -1,4 +1,4 @@ -/* $Id: man_term.c,v 1.144 2014/03/30 21:28:01 schwarze Exp $ */ +/* $Id: man_term.c,v 1.145 2014/04/08 07:13:11 schwarze Exp $ */ /* * Copyright (c) 2008-2012 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2014 Ingo Schwarze <schwarze@openbsd.org> @@ -278,7 +278,7 @@ pre_literal(DECL_ARGS) p->offset = p->rmargin; p->rmargin = p->maxrmargin; p->trailspace = 0; - p->flags &= ~TERMP_NOBREAK; + p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); p->flags |= TERMP_NOSPACE; } @@ -547,7 +547,7 @@ pre_HP(DECL_ARGS) } if ( ! (MANT_LITERAL & mt->fl)) { - p->flags |= TERMP_NOBREAK; + p->flags |= TERMP_NOBREAK | TERMP_BRIND; p->trailspace = 2; } @@ -582,7 +582,7 @@ post_HP(DECL_ARGS) switch (n->type) { case (MAN_BODY): term_newln(p); - p->flags &= ~TERMP_NOBREAK; + p->flags &= ~(TERMP_NOBREAK | TERMP_BRIND); p->trailspace = 0; p->offset = mt->offset; p->rmargin = p->maxrmargin; |