Skip to content

[Bug] Incorrect rendering when internal verticals are disabled #198

@zdenek-crha

Description

@zdenek-crha

Describe the bug

I'm trying to create custom rendering preset that looks like ASCII_MARKDOWN but with all vertical bars replaced by space:

 ID   DATE         TIME       USER   DESCRIPTION   PAYLOAD
---- ------------ ---------- ------ ------------- ---------
 1    2026-01-07   14:17:29                        FOO
 2    2026-01-07   14:17:22

When I disable internal vertical bars (both for divider and cell), then cells are rendered with different width than divider between header/body.

Steps to reproduce

let mut table = Table::new();
table.load_preset("||   -              ");

// ... fill table ...

println!("{}", table)

Then cells are rendered with different width than divider between header/body:

| ID  DATE        TIME      USER  DESCRIPTION  PAYLOAD |
 ---- ------------ ---------- ------ ------------- ---------
| 1   2026-01-07  14:17:29                     FOO     |
| 2   2026-01-07  14:17:22                             |

This happens only when both cell and divider character for internal vertical is set to space. Setting either to non-space character will render the cell/divider width correctly.

Logs (if applicable)

No response

Operating system

Debian

Comfy-table version

v7.1.4. v7.2.1

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    t: bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions