From 85ec510bdc9ea4db94a03a41ee888893bb39e21e Mon Sep 17 00:00:00 2001 From: schwarze Date: Thu, 29 Jun 2017 16:30:47 +0000 Subject: [PATCH] Skip whitespace at the beginning of eqn(7) nodes, in particular ~ and ^ that misrendered; found by bentley@ in glCopyTexSubImage1D(3); also affected glAccum(3), glClipPlane(3), glDrawPixels(3), glEvalMesh(3), and others. --- usr.bin/mandoc/eqn.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/mandoc/eqn.c b/usr.bin/mandoc/eqn.c index ddf1c6c4848..21f21919d68 100644 --- a/usr.bin/mandoc/eqn.c +++ b/usr.bin/mandoc/eqn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eqn.c,v 1.34 2017/06/26 19:53:00 schwarze Exp $ */ +/* $OpenBSD: eqn.c,v 1.35 2017/06/29 16:30:47 schwarze Exp $ */ /* * Copyright (c) 2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015, 2017 Ingo Schwarze @@ -681,7 +681,7 @@ eqn_parse(struct eqn_node *ep, struct eqn_box *parent) if (ep->data == NULL) return ROFF_IGN; - ep->start = ep->end = ep->data; + ep->start = ep->end = ep->data + strspn(ep->data, " ^~"); next_tok: tok = eqn_next(ep, MODE_TOK); -- 2.20.1