=================================================================== RCS file: /cvs/mandoc/main.c,v retrieving revision 1.140 retrieving revision 1.143 diff -u -p -r1.140 -r1.143 --- mandoc/main.c 2011/01/24 23:41:55 1.140 +++ mandoc/main.c 2011/02/06 20:36:36 1.143 @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.140 2011/01/24 23:41:55 schwarze Exp $ */ +/* $Id: main.c,v 1.143 2011/02/06 20:36:36 kristaps Exp $ */ /* * Copyright (c) 2008, 2009, 2010, 2011 Kristaps Dzonsons * Copyright (c) 2010, 2011 Ingo Schwarze @@ -146,6 +146,7 @@ static const char * const mandocerrs[MANDOCERR_MAX] = /* related to macros and nesting */ "skipping obsolete macro", "skipping paragraph macro", + "skipping no-space macro", "blocks badly nested", "child violates parent syntax", "nested displays are not portable", @@ -656,6 +657,7 @@ pdesc(struct curparse *curp) static void parsebuf(struct curparse *curp, struct buf blk, int start) { + const struct tbl_span *span; struct buf ln; enum rofferr rr; int i, of, rc; @@ -855,11 +857,14 @@ rerun: if (ROFF_TBL == rr) { assert(curp->man || curp->mdoc); - if (curp->man) - man_addspan(curp->man, roff_span(curp->roff)); - else - mdoc_addspan(curp->mdoc, roff_span(curp->roff)); - + while (NULL != (span = roff_span(curp->roff))) { + if (curp->man) + man_addspan(curp->man, span); + else + mdoc_addspan(curp->mdoc, span); + } + } else if (ROFF_EQN == rr) { + assert(curp->man || curp->mdoc); } else if (curp->man || curp->mdoc) { rc = curp->man ? man_parseln(curp->man,