aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/roff.c
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-06-27 13:29:14 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-06-27 13:29:14 +0000
commite16f33ffa196e897ff89b90138f8ebb37efdb896 (patch)
tree1bd6f6b728e3f2376df55d0e9b6175a0b436b393 /roff.c
parentd123e1aa74eccae607076c5bbe6a688140f52b15 (diff)
downloadmandoc-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).
Diffstat (limited to 'roff.c')
-rw-r--r--roff.c4
1 files changed, 3 insertions, 1 deletions
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 <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;
}