diff options
author | Ingo Schwarze <schwarze@openbsd.org> | 2015-03-03 21:11:34 +0000 |
---|---|---|
committer | Ingo Schwarze <schwarze@openbsd.org> | 2015-03-03 21:11:34 +0000 |
commit | c6296bc7ed652f57acb7b7ab9f7ee04a79f56d84 (patch) | |
tree | bd8cf85f86e99dd87419269ec9647e44b606ba6a | |
parent | bf7c1869669b3860fa6597e6b4318ba2c63ae26e (diff) | |
download | mandoc-c6296bc7ed652f57acb7b7ab9f7ee04a79f56d84.tar.gz |
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.
-rw-r--r-- | man_html.c | 2 | ||||
-rw-r--r-- | mdoc_html.c | 2 |
2 files changed, 4 insertions, 0 deletions
@@ -223,6 +223,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/mdoc_html.c b/mdoc_html.c index bff01cf2..b89b8a0c 100644 --- a/mdoc_html.c +++ b/mdoc_html.c @@ -411,6 +411,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: |