diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-06-27 13:29:14 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-06-27 13:29:14 +0000 |
commit | e16f33ffa196e897ff89b90138f8ebb37efdb896 (patch) | |
tree | 1bd6f6b728e3f2376df55d0e9b6175a0b436b393 | |
parent | d123e1aa74eccae607076c5bbe6a688140f52b15 (diff) | |
download | mandoc-e16f33ffa196e897ff89b90138f8ebb37efdb896.tar.gz mandoc-e16f33ffa196e897ff89b90138f8ebb37efdb896.tar.zst mandoc-e16f33ffa196e897ff89b90138f8ebb37efdb896.zip |
Ignore blank characters at the beginning of a conditional block,
that is, after "\{".
Issue found by Markus <Waldeck at gmx dot de> in bash(1).
-rw-r--r-- | roff.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1,4 +1,4 @@ -/* $Id: roff.c,v 1.271 2015/05/31 23:13:22 schwarze Exp $ */ +/* $Id: roff.c,v 1.272 2015/06/27 13:29:14 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2010-2015 Ingo Schwarze <schwarze@openbsd.org> @@ -2265,6 +2265,8 @@ roff_cond(ROFF_ARGS) if (buf->buf[pos] == '\\' && buf->buf[pos + 1] == '{') { r->last->endspan = -1; pos += 2; + while (buf->buf[pos] == ' ') + pos++; goto out; } |