=================================================================== RCS file: /cvs/mandoc/mdoc.c,v retrieving revision 1.226 retrieving revision 1.228 diff -u -p -r1.226 -r1.228 --- mandoc/mdoc.c 2014/10/16 01:11:20 1.226 +++ mandoc/mdoc.c 2014/10/20 15:50:24 1.228 @@ -1,4 +1,4 @@ -/* $Id: mdoc.c,v 1.226 2014/10/16 01:11:20 schwarze Exp $ */ +/* $Id: mdoc.c,v 1.228 2014/10/20 15:50:24 schwarze Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2012, 2013, 2014 Ingo Schwarze @@ -205,6 +205,8 @@ mdoc_addeqn(struct mdoc *mdoc, const struct eqn *ep) n = node_alloc(mdoc, ep->ln, ep->pos, MDOC_MAX, MDOC_EQN); n->eqn = ep; + if (ep->ln > mdoc->last->line) + n->flags |= MDOC_LINE; if ( ! node_append(mdoc, n)) return(0); @@ -236,7 +238,8 @@ int mdoc_parseln(struct mdoc *mdoc, int ln, char *buf, int offs) { - mdoc->flags |= MDOC_NEWLINE; + if (mdoc->last->type != MDOC_EQN || ln > mdoc->last->line) + mdoc->flags |= MDOC_NEWLINE; /* * Let the roff nS register switch SYNOPSIS mode early,