Skip to content

Header alignment overrides unexpectedly change HTML body cell alignment #476

Open

Description

@nawaaaaaAaar

On unchanged upstream 268615a, tabulate([["item", 42]], headers=["Label", "Value"], tablefmt="html", headersalign=("center", "left")) changes the td styles to center/left as well as changing the th styles. Without the header-only override, the data cells correctly use left/right. headersalign is documented as a header-specific override, so numeric data should remain right-aligned and explicit colalign should remain honored. The fallback header alignment aliases the data alignment list and then mutates it. Six regression cases fail before the change; ten controls with independent global header alignment or already matching data styles pass. A copy of that list keeps the existing formatting but separates the two states. Investigated with AI assistance; no personal account-owner review or attestation is asserted.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions