diff options
author | 2017-07-14 13:32:27 +0000 | |
---|---|---|
committer | 2017-07-14 13:32:27 +0000 | |
commit | 9884404ad1bf6f249902b1f2f366d17bc0ba41f0 (patch) | |
tree | 0c5b85d33a99858e30afc8abdd3a79d3432aee61 | |
parent | Do not mix Perl read() with sysread(). Data could get stuck in the (diff) | |
download | wireguard-openbsd-9884404ad1bf6f249902b1f2f366d17bc0ba41f0.tar.xz wireguard-openbsd-9884404ad1bf6f249902b1f2f366d17bc0ba41f0.zip |
do not print <math class="eqn"><mrow></mrow></math> for empty .EQ;
issue reported by bentley@
-rw-r--r-- | usr.bin/mandoc/eqn_html.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/usr.bin/mandoc/eqn_html.c b/usr.bin/mandoc/eqn_html.c index b725bfc46c6..a0d3ecb0296 100644 --- a/usr.bin/mandoc/eqn_html.c +++ b/usr.bin/mandoc/eqn_html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: eqn_html.c,v 1.12 2017/07/08 14:51:01 schwarze Exp $ */ +/* $OpenBSD: eqn_html.c,v 1.13 2017/07/14 13:32:27 schwarze Exp $ */ /* * Copyright (c) 2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2017 Ingo Schwarze <schwarze@openbsd.org> @@ -229,6 +229,9 @@ print_eqn(struct html *p, const struct eqn_box *bp) { struct tag *t; + if (bp->first == NULL) + return; + t = print_otag(p, TAG_MATH, "c", "eqn"); p->flags |= HTML_NONOSPACE; |