From d38c7a9a5f3ac742656dcf66f5f6205b39714767 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 4 Apr 2015 13:53:00 +0000 Subject: 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). --- usr.bin/mandoc/roff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/usr.bin/mandoc/roff.c b/usr.bin/mandoc/roff.c index 3835f1adbfa..32b7f1d30c4 100644 --- a/usr.bin/mandoc/roff.c +++ b/usr.bin/mandoc/roff.c @@ -1,4 +1,4 @@ -/* $OpenBSD: roff.c,v 1.135 2015/02/21 14:46:33 schwarze Exp $ */ +/* $OpenBSD: roff.c,v 1.136 2015/04/04 13:52:59 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2012, 2014 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -1126,6 +1126,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++; -- cgit v1.2.3