bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#71685: [PATCH] fix shr rendering in tables without tbody


From: JD Smith
Subject: bug#71685: [PATCH] fix shr rendering in tables without tbody
Date: Sat, 6 Jul 2024 14:13:30 -0400


> On Jul 6, 2024, at 3:36 AM, Eli Zaretskii <eliz@gnu.org> wrote:
> 
>> From: JD Smith <jdtsmith@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.

Thanks.  I'm afraid I don't have write access on savannah.  I've added a test 
and formatted the patch, below.  All shr tests succeed.

Attachment: 0001-Fix-formatting-of-tables-with-thead-tfoot-but-no-tbo.patch
Description: Binary data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]