summaryrefslogtreecommitdiffstats
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
commit0a60a4d86aa07468be2f890f10d7b1789095f7ec (patch)
tree6fcea8d7c7b5387bf9fd915765b880830ad8bd26
parent1c1cbd90a18a89a68fe6354f954712c9d22b1906 (diff)
downloadmandoc-0a60a4d86aa07468be2f890f10d7b1789095f7ec.tar.gz
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.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/roff.c b/roff.c
index 8200f6db..0077edc9 100644
--- a/roff.c
+++ b/roff.c
@@ -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;
}