=================================================================== RCS file: /cvs/mandoc/mdoc_html.c,v retrieving revision 1.224 retrieving revision 1.226 diff -u -p -r1.224 -r1.226 --- mandoc/mdoc_html.c 2015/02/11 14:15:12 1.224 +++ mandoc/mdoc_html.c 2015/03/03 21:11:34 1.226 @@ -1,4 +1,4 @@ -/* $Id: mdoc_html.c,v 1.224 2015/02/11 14:15:12 schwarze Exp $ */ +/* $Id: mdoc_html.c,v 1.226 2015/03/03 21:11:34 schwarze Exp $ */ /* * Copyright (c) 2008-2011, 2014 Kristaps Dzonsons * Copyright (c) 2014, 2015 Ingo Schwarze @@ -35,7 +35,7 @@ #define INDENT 5 #define MDOC_ARGS const struct mdoc_meta *meta, \ - const struct mdoc_node *n, \ + struct mdoc_node *n, \ struct html *h #ifndef MIN @@ -267,7 +267,7 @@ void html_mdoc(void *arg, const struct mdoc *mdoc) { - print_mdoc(mdoc_meta(mdoc), mdoc_node(mdoc), + print_mdoc(mdoc_meta(mdoc), mdoc_node(mdoc)->child, (struct html *)arg); putchar('\n'); } @@ -387,6 +387,7 @@ print_mdoc_node(MDOC_ARGS) child = 1; t = h->tags.head; + n->flags &= ~MDOC_ENDED; switch (n->type) { case MDOC_ROOT: @@ -410,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: @@ -457,7 +460,7 @@ print_mdoc_node(MDOC_ARGS) break; (*mdocs[n->tok].post)(meta, n, h); if (n->end != ENDBODY_NOT) - n->pending->flags |= MDOC_ENDED; + n->body->flags |= MDOC_ENDED; if (n->end == ENDBODY_NOSPACE) h->flags |= HTML_NOSPACE; break; @@ -1122,7 +1125,7 @@ mdoc_bd_pre(MDOC_ARGS) { struct htmlpair tag[2]; int comp, sv; - const struct mdoc_node *nn; + struct mdoc_node *nn; struct roffsu su; if (MDOC_HEAD == n->type)