From e16f33ffa196e897ff89b90138f8ebb37efdb896 Mon Sep 17 00:00:00 2001 From: Ingo Schwarze Date: Sat, 27 Jun 2015 13:29:14 +0000 Subject: Ignore blank characters at the beginning of a conditional block, that is, after "\{". Issue found by Markus in bash(1). --- roff.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/roff.c b/roff.c index 0dfcb46c..3123d8f3 100644 --- a/roff.c +++ b/roff.c @@ -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 * Copyright (c) 2010-2015 Ingo Schwarze @@ -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; } -- cgit v1.2.3