asciidoctor/asciidoctor.js

Tables: Cell alignment wrongly inherited after cell spans

fbruetting opened this issue · 1 comments

Problem

I just tried to span a cell along three rows. But the cells in the column after the spanned cell (except for the first one) all inherit the alignment of the column of the spanned cell instead of their own column’s default. I would expect all cs of the third column to get centered, because I never changed the format of that column.

I tested with the Firefox-Extension “Asciidoctor.js Live Preview” v2.7.0.

Code

[cols="^.^4, >.^2, ^.^4"]
|===
| Center     | Right  | Center

| a          | b      | c
| a      .3+<| b      | c
| a                   | c
| a                   | c
| a          | b      | c
|===

Result

Bildschirmfoto vom 2022-11-10 15-42-52

This is a known issue in Asciidoctor core. Using row spans can throw off the mapping of the colspec. In these cases, you need to put the alignment on the cell itself.