GNU bug report logs - #71685
[PATCH] fix shr rendering in tables without tbody

Previous Next

Package: emacs;

Reported by: JD Smith <jdtsmith <at> gmail.com>

Date: Thu, 20 Jun 2024 19:16:01 UTC

Severity: normal

Tags: patch

Fixed in version 30.1

Done: Stefan Kangas <stefankangas <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


Message #8 received at 71685 <at> debbugs.gnu.org (full text, mbox):

From: Eli Zaretskii <eliz <at> gnu.org>
To: JD Smith <jdtsmith <at> gmail.com>
Cc: 71685 <at> debbugs.gnu.org
Subject: Re: bug#71685: [PATCH] fix shr rendering in tables without tbody
Date: Sat, 06 Jul 2024 10:36:31 +0300
> From: JD Smith <jdtsmith <at> gmail.com>
> Date: Thu, 20 Jun 2024 15:15:32 -0400
> 
> It is very common for HTML tables to include a header (<thead>) and/or footer (<tfoot>) without using <tbody>.  Modern browsers simply supply an implicit <tbody>..</tbody> around all the unparented rows in a table.  `shr' does not handle this common case correctly.  Below is an example with <thead> but not <tbody>.  It prints the header, but then subsumes it again inside the derived body, printing the header again in a single cell.  
> 
> The relevant function which should handle this is `shr--fix-tbody'.   The included patch to this function simply avoids including `thead` and `tfoot` children in the implicit body.

Thanks.  I don't see any experts chiming in, so if you are confident
in the patch, and it doesn't fail the existing tests, please install
on the emacs-30 branch, and thanks.  Bonus points for adding a test
for this case.




This bug report was last modified 1 year and 33 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.