asciidoctor/asciidoctor.js

Missing borders of table cells preceding cell that spans multiple rows

OsePedro opened this issue · 3 comments

In tables with a cell that spans multiple rows, the right border of all cells to the left of that cell (except the first) are usually omitted. However, the borders are correctly rendered when the spanning cell sits to the left of non-spanning cells.

E.g. consider the following tables:

|===
|Column 1, header row |Column 2, header row |Column 3, header row |Column 4, header row

|Cell in column 1, row 2
2.3+|This cell spans columns 2 and 3 and rows 2, 3, and 4 because its specifier contains a span of `2.3+`
|Cell in column 4, row 2

|Cell in column 1, row 3
|Cell in column 4, row 3

|Cell in column 1, row 4
|Cell in column 4, row 4
|===

|===
|Column 1, header row |Column 2, header row |Column 3, header row

|Cell in column 1, row 2
2.3+|This cell spans columns 2 and 3 and rows 2, 3, and 4 because its specifier contains a span of `2.3+`

|Cell in column 1, row 3

|Cell in column 1, row 4
|===

The asciidoctor command produces the following html results on my machine:

html-table

The first table is example 3 in the "Span Columns and Rows" section of the documentation, and the second table is the same, except that I have removed column 4, to trigger the bug.

I presume that this is an asciidoctor.js issue rather than an issue with the core asciidoctor system, because asciidoctor-pdf renders both tables correctly:

pdf-table

It looks like this specific issue hasn't been reported yet. But is it related to this issue?

I am running 64-bit Ubuntu 20.04, and I installed asciidoctor through the asciidoctor and ruby-asciidoctor-pdf apt packages. The versions are:

$ asciidoctor --version
Asciidoctor 2.0.10 [https://asciidoctor.org]
Runtime Environment (ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)

$ asciidoctor-pdf --version
Asciidoctor PDF 1.5.0.alpha.17.dev using Asciidoctor 2.0.10 [https://asciidoctor.org]
Runtime Environment (ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)

I presume that this is an asciidoctor.js issue rather than an issue with the core asciidoctor system, because asciidoctor-pdf renders both tables correctly:

You meant an asciidoctor/asciidoctor issue? As far as I can tell you are using Asciidoctor (Ruby):

$ asciidoctor --version
Asciidoctor 2.0.10 [https://asciidoctor.org/]
Runtime Environment (ruby 2.7.0p0 (2019-12-25 revision 647ee6f091) [x86_64-linux-gnu]) (lc:UTF-8 fs:UTF-8 in:UTF-8 ex:UTF-8)

Could you please retry using the latest version 2.0.20?
I think it's related to asciidoctor/asciidoctor#2563 and fixed in asciidoctor/asciidoctor#3387

Asciidoctor 2.0.10

That is a very old version of Asciidoctor. This problem has long been resolved.

Ah yes you're right, 2.0.20 fixes the issue. Sorry, I should have tried upgrading before reporting the issue.