Skip to content

RowSpan extra column #269

@markmadlangbayan

Description

@markmadlangbayan

My intention is to produce a table that looks like this:

┌────┬────┬────┐
│ A1 │ B1 │ C1 │
│    ├────┼────┤
│    │ B2 │ C2 │
│    │    ├────┤
│    │    │ C3 │ 
└────┴────┴────┘

For some reason, it looks like this:

┌────┬────┬────┐
│ A1 │ B1 │ C1 │
│    ├────┼────┤
│    │ B2 │ C2 │
│    │    ├────├────┤
│    │    │ C3 │    │
└────┴────┴────┴────┘
    const tbl = new Table();
    tbl.push([ { rowSpan: 3, content: 'A1' }, 'B1', 'C1'], 
             [ { rowSpan: 2, content: 'B2' }, 'C2'],
             ['C3']);
    console.log(tbl.toString());

I can remove the extra column in this example by making the third row an empty array, but I do need to display 'C3'.

I saw PR 187, so I thought it is already fixed. I verified that I have the code, but still getting that extra column.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions