Skip to content

Tables cannot draw row dividers or an outer frame — border visibility is hardcoded #563

Description

@nguyenvanduocit

Summary

A glamour table always renders with the header rule and column separators only. There is no way, through a style, to draw a horizontal divider between rows or to box a table in.

Details

ansi.(*TableElement).setBorders hardcodes the border visibility: it always calls BorderTop/Left/Right/Bottom(false) and never enables lipgloss's BorderRow. The StyleTable config only exposes the separator characters (row_separator, column_separator, center_separator) — i.e. which glyph draws a rule — not whether a given border is drawn. So changing row_separator only changes the character of the existing header rule; it never produces inter-row dividers.

Reproduction

Render any markdown table with any standard style (or set row_separator to any character). The output always has exactly one rule, under the header — never a line between body rows.

Desired behavior

Be able to opt into row dividers and/or an outer frame through the style config, while keeping the current look as the default.

Note

lipgloss v2 guards the row-separator end-caps behind border-left/right, so enabling BorderRow with the frame off now yields clean dividers (no protruding /) — the old charmbracelet/lipgloss#355 artifact does not apply on v2.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions