summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-04-04 13:53:42 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-04-04 13:53:42 +0000
commit1eb78526299027f34b6c7cc779729565d0c752aa (patch)
tree9aef8b208bf1302703b3415b86f89ae84701ff62
parentd4849c125a2536970d94e48746b9c97cddeee0c1 (diff)
downloadmandoc-1eb78526299027f34b6c7cc779729565d0c752aa.tar.gz
Don't allow breaking the output line after hyphens following escape
sequences. Improves tic(1), sxpm(1), and a few Perl manuals. Quirk found by naddy@ in milter-greylist(8).
-rw-r--r--roff.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/roff.c b/roff.c
index be15f1ac..c1370154 100644
--- a/roff.c
+++ b/roff.c
@@ -1128,6 +1128,8 @@ roff_parsetext(struct buf *buf, int pos, int *offs)
esc = mandoc_escape((const char **)&p, NULL, NULL);
if (esc == ESCAPE_ERROR)
break;
+ while (*p == '-')
+ p++;
continue;
} else if (p == start) {
p++;