From: schwarze@mandoc.bsd.lv
To: source@mandoc.bsd.lv
Subject: mandoc: When looking for the last layout row used, we need to look at
Date: Sat, 15 May 2021 12:19:34 -0500 (EST) [thread overview]
Message-ID: <c2a98c208764ca00@mandoc.bsd.lv> (raw)
Log Message:
-----------
When looking for the last layout row used, we need to look at the layout
row used for the previous data line containing data, not at the previous
data line outright, which might be a horizontal ruler. If it is, do not
restart from the first layout row but still proceed to the next data row,
which may have been just read from T&.
Bug originally reported by Oliver dot Corff at email dot de
on groff at gnu dot org:
https://lists.gnu.org/archive/html/groff/2021-03/msg00003.html
and forwarded to me by bentley@.
Patch OK'ed by bentley@ back in April.
Modified Files:
--------------
mandoc:
tbl_data.c
Revision Data
-------------
Index: tbl_data.c
===================================================================
RCS file: /home/cvs/mandoc/mandoc/tbl_data.c,v
retrieving revision 1.53
retrieving revision 1.54
diff -Ltbl_data.c -Ltbl_data.c -u -p -r1.53 -r1.54
--- tbl_data.c
+++ tbl_data.c
@@ -244,10 +244,11 @@ tbl_data(struct tbl_node *tbl, int ln, c
struct tbl_cell *cp;
struct tbl_span *sp;
- rp = (sp = tbl->last_span) == NULL ? tbl->first_row :
- sp->pos == TBL_SPAN_DATA && sp->layout->next != NULL ?
- sp->layout->next : sp->layout;
-
+ for (sp = tbl->last_span; sp != NULL; sp = sp->prev)
+ if (sp->pos == TBL_SPAN_DATA)
+ break;
+ rp = sp == NULL ? tbl->first_row :
+ sp->layout->next == NULL ? sp->layout : sp->layout->next;
assert(rp != NULL);
if (p[1] == '\0') {
--
To unsubscribe send an email to source+unsubscribe@mandoc.bsd.lv
reply other threads:[~2021-05-15 17:19 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c2a98c208764ca00@mandoc.bsd.lv \
--to=schwarze@mandoc.bsd.lv \
--cc=source@mandoc.bsd.lv \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).