diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-04 13:53:42 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-04-04 13:53:42 +0000 |
commit | ec66e073f559e3a2d8c56fd67060b2ccde12788a (patch) | |
tree | 906a82a7dda34675c9232bb168cc1cac6f721af7 | |
parent | a5c677ee3a4424a0bf941147a939dc444d3849cb (diff) | |
download | mandoc-ec66e073f559e3a2d8c56fd67060b2ccde12788a.tar.gz mandoc-ec66e073f559e3a2d8c56fd67060b2ccde12788a.tar.zst mandoc-ec66e073f559e3a2d8c56fd67060b2ccde12788a.zip |
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.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 <kristaps@bsd.lv> * Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -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++; |