Discussion:
shr and colspan?
Adam Sjøgren
2014-10-07 15:05:15 UTC
Permalink
<html>
<head>
</head>
<body>
<p>Does shr support colspan?</p>

<table>
<tr><td>R1C1</td><td>R1C2</td></tr>
<tr><td colspan="2">R2C1 and R2C2 in one</td></tr>
</table>
</body>
</html>
Adam Sjøgren
2014-10-07 15:13:06 UTC
Permalink
Post by Adam Sjøgren
<html>
<head>
Apparently I don't know how to send an HTML-email in Gnus.
Post by Adam Sjøgren
<table>
<tr><td>R1C1</td><td>R1C2</td></tr>
<tr><td colspan="2">R2C1 and R2C2 in one</td></tr>
</table>
Then shr renders it thus:

R1C1 R1C2
R2C1 and R2C2 in one

While other HTML renderers™ show me something like this:

R1C1 R1C2
R2C1 and R2C2 in one

which is more like what I would have expected, as the second row's only
cell has colspan="2" in it.

It shr supposed to handle colspan?


Best regards,

Adam
--
"Oh, we all like motorcycles, to some degree." Adam Sjøgren
***@koldfront.dk
Eric S Fraga
2014-10-08 10:38:40 UTC
Permalink
Post by Adam Sjøgren
Apparently I don't know how to send an HTML-email in Gnus.
Good! :)
--
: Eric S Fraga, GnuPG: 0xFFFCF67D
: in Emacs 25.0.50.1 + Ma Gnus v0.12 + evil-git-40d08c9
: BBDB version 3.1.2 (2014-05-06 11:45:08 -0500)
Ted Zlatanov
2014-10-14 19:49:56 UTC
Permalink
On Tue, 07 Oct 2014 17:13:06 +0200 ***@koldfront.dk (Adam Sjøgren) wrote:

AS> It shr supposed to handle colspan?

Supposedly, according to the ChangeLog :)

2013-06-18 Lars Magne Ingebrigtsen <***@gnus.org>

* shr.el (shr-tag-table): Insert the images after the table, so that
they're not covered by the table colourisation, which often looked
awkward.
(shr-tag-dl, shr-tag-dt, shr-tag-dd): Add support for <dl>, <dt> and
<dd>.
(shr-make-table-1): Implement <td colspan=> support.
(shr-insert-document): Use one less than window width if `shr-width' is
nil, since otherwise things may get one character too wide.
Lars Ingebrigtsen
2015-01-26 06:08:15 UTC
Permalink
Post by Adam Sjøgren
It shr supposed to handle colspan?
There were two bugs. Due to a typo made during the dom.el conversion,
all colspans were ignored. But even after fixing that, the widths
weren't really computed correctly.

I've had another stab at it, but that stuff is kinda complicated. It
works for your test case and more complicated stuff like

---------- ---- ---- ----
|R1C1 |R1C2|R1C2|R1C2|
---------- ---- ---- ----
|R2C1 and R2C2 |RC4 |
|in one | |
---------- ---- ---- ----

but I haven't tested extensively with other layout combinations.
--
(domestic pets only, the antidote for overdose, milk.)
bloggy blog http://lars.ingebrigtsen.no/
Adam Sjøgren
2015-01-26 20:15:28 UTC
Permalink
Post by Lars Ingebrigtsen
Post by Adam Sjøgren
It shr supposed to handle colspan?
There were two bugs. Due to a typo made during the dom.el conversion,
all colspans were ignored.
That one I ought to have been able to find myself :*)
Post by Lars Ingebrigtsen
But even after fixing that, the widths weren't really computed
correctly.
I've had another stab at it, but that stuff is kinda complicated. It
works for your test case and more complicated stuff like
---------- ---- ---- ----
|R1C1 |R1C2|R1C2|R1C2|
---------- ---- ---- ----
|R2C1 and R2C2 |RC4 |
|in one | |
---------- ---- ---- ----
Cool, I will give it a whirl with my real (work) email. Thanks!


Best regards,

Adam
--
"Du ligner altså ham der den tykke fra Junior Adam Sjøgren
Senior, du gør." ***@koldfront.dk
Loading...