summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2017-06-29 16:31:15 +0000
committerIngo Schwarze <schwarze@openbsd.org>2017-06-29 16:31:15 +0000
commit17984e1e0b09558f8bfb0a8ee9e49bc97e4a554e (patch)
treed6cc563d66764e1394d0e1a445fbe2728392661c
parent16ab65c3e3a699cbb2591d1d913f77b9ee7e25ef (diff)
downloadmandoc-17984e1e0b09558f8bfb0a8ee9e49bc97e4a554e.tar.gz
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.
-rw-r--r--eqn.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/eqn.c b/eqn.c
index d1e2bf7b..c6bd121a 100644
--- a/eqn.c
+++ b/eqn.c
@@ -683,7 +683,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);