aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorIngo Schwarze <schwarze@openbsd.org>2015-03-03 21:11:34 +0000
committerIngo Schwarze <schwarze@openbsd.org>2015-03-03 21:11:34 +0000
commitc059952238a30471c40b13effbfb4d0fa9029987 (patch)
treef60964553cae381952ba1a95750664f12181b5f4
parentbc801ebe2f90cc370e6bc0904ff6e813e5c94ce6 (diff)
downloadmandoc-c059952238a30471c40b13effbfb4d0fa9029987.tar.gz
mandoc-c059952238a30471c40b13effbfb4d0fa9029987.tar.zst
mandoc-c059952238a30471c40b13effbfb4d0fa9029987.zip
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.c4
-rw-r--r--mdoc_html.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/man_html.c b/man_html.c
index 0e0fad9e..11094150 100644
--- a/man_html.c
+++ b/man_html.c
@@ -1,4 +1,4 @@
-/* $Id: man_html.c,v 1.111 2015/02/10 08:05:30 schwarze Exp $ */
+/* $Id: man_html.c,v 1.112 2015/03/03 21:11:34 schwarze Exp $ */
/*
* Copyright (c) 2008-2012, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2013, 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -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 09104f8f..fba7fb6f 100644
--- a/mdoc_html.c
+++ b/mdoc_html.c
@@ -1,4 +1,4 @@
-/* $Id: mdoc_html.c,v 1.225 2015/02/12 12:24:33 schwarze Exp $ */
+/* $Id: mdoc_html.c,v 1.226 2015/03/03 21:11:34 schwarze Exp $ */
/*
* Copyright (c) 2008-2011, 2014 Kristaps Dzonsons <kristaps@bsd.lv>
* Copyright (c) 2014, 2015 Ingo Schwarze <schwarze@openbsd.org>
@@ -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: