diff options
author | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-03-03 21:09:26 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@cvs.openbsd.org> | 2015-03-03 21:09:26 +0000 |
commit | 0eca85794d6e173aacacf351ee978e6ae0eaf3b5 (patch) | |
tree | ce4b37947f2c2a5e0d492fac6777b52a523b2981 /usr.bin | |
parent | 59bbe2b76c7b98a334da0cd458500b907c18d407 (diff) |
If an eqn(7) starts on a new input line, be sure to output whitespace
in front of it. Issue found by tedu@ in glOrtho(3).
There are also cases of excessive whitespace before and after
equations. This patch neither fixes them nor makes them worse.
Diffstat (limited to 'usr.bin')
-rw-r--r-- | usr.bin/mandoc/man_html.c | 4 | ||||
-rw-r--r-- | usr.bin/mandoc/mdoc_html.c | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/usr.bin/mandoc/man_html.c b/usr.bin/mandoc/man_html.c index ba03997a7e3..45031122cd0 100644 --- a/usr.bin/mandoc/man_html.c +++ b/usr.bin/mandoc/man_html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: man_html.c,v 1.64 2015/02/10 08:05:07 schwarze Exp $ */ +/* $OpenBSD: man_html.c,v 1.65 2015/03/03 21:09:25 schwarze Exp $ */ /* * Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -221,6 +221,8 @@ print_man_node(MAN_ARGS) print_text(h, n->string); return; case MAN_EQN: + if (n->flags & MAN_LINE) + putchar('\n'); print_eqn(h, n->eqn); break; case MAN_TBL: diff --git a/usr.bin/mandoc/mdoc_html.c b/usr.bin/mandoc/mdoc_html.c index 3bd5eb3bddc..02e94dd23ac 100644 --- a/usr.bin/mandoc/mdoc_html.c +++ b/usr.bin/mandoc/mdoc_html.c @@ -1,4 +1,4 @@ -/* $OpenBSD: mdoc_html.c,v 1.100 2015/02/12 12:20:47 schwarze Exp $ */ +/* $OpenBSD: mdoc_html.c,v 1.101 2015/03/03 21:09:25 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv> * Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org> @@ -409,6 +409,8 @@ print_mdoc_node(MDOC_ARGS) h->flags |= HTML_NOSPACE; return; case MDOC_EQN: + if (n->flags & MDOC_LINE) + putchar('\n'); print_eqn(h, n->eqn); break; case MDOC_TBL: |