* mdocml: Two minor fixes for the "allbox" modifier: 1.
@ 2017-06-12 22:49 schwarze
0 siblings, 0 replies; only message in thread
From: schwarze @ 2017-06-12 22:49 UTC (permalink / raw)
To: source
Log Message:
-----------
Two minor fixes for the "allbox" modifier:
1. It does not reduce explicit "||" in the layout to "|".
2. It does not cause three horizontal lines at the end of a table,
even if the table ends with an explicit "_" data line.
Modified Files:
--------------
mdocml:
tbl_term.c
Revision Data
-------------
Index: tbl_term.c
===================================================================
RCS file: /home/cvs/mdocml/mdocml/tbl_term.c,v
retrieving revision 1.49
retrieving revision 1.50
diff -Ltbl_term.c -Ltbl_term.c -u -p -r1.49 -r1.50
--- tbl_term.c
+++ tbl_term.c
@@ -242,7 +242,8 @@ term_tbl(struct termp *tp, const struct
cp = cp->next;
} else
vert = 0;
- if (sp->opts->opts & TBL_OPT_ALLBOX)
+ if (vert == 0 &&
+ sp->opts->opts & TBL_OPT_ALLBOX)
vert = 1;
if (vert == 0)
continue;
@@ -302,7 +303,9 @@ term_tbl(struct termp *tp, const struct
free(tp->tbl.cols);
tp->tbl.cols = NULL;
tp->tcol->offset = offset;
- } else if (horiz == 0 && sp->opts->opts & TBL_OPT_ALLBOX)
+ } else if (horiz == 0 && sp->opts->opts & TBL_OPT_ALLBOX &&
+ (sp->next == NULL || sp->next->pos == TBL_SPAN_DATA ||
+ sp->next->next != NULL))
tbl_hrule(tp, sp, 1);
tp->flags &= ~TERMP_NONOSPACE;
--
To unsubscribe send an email to source+unsubscribe@mdocml.bsd.lv
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2017-06-12 22:49 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-12 22:49 mdocml: Two minor fixes for the "allbox" modifier: 1 schwarze
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).