From ec66e073f559e3a2d8c56fd67060b2ccde12788a Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 4 Apr 2015 13:53:42 +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). --- roff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roff.c b/roff.c index 3c920137..86daa3cc 100644 --- a/roff.c +++ b/roff.c @@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.263 2015/02/21 14:46:58 schwarze Exp $ */ +/* $Id: roff.c,v 1.264 2015/04/04 13:53:42 schwarze Exp $ */ /* * Copyright (c) 2010, 2011, 2012, 2014 Kristaps Dzonsons * Copyright (c) 2010-2015 Ingo Schwarze @@ -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++; -- cgit v1.2.3-56-ge451