Skip to content

Support fixed-width table alignment row #217

@vweevers

Description

@vweevers

Subject of the feature

Support fixed-width columns like | --- | --- | regardless of cell content.

Problem

I'm looking to match remark-lint-table-cell-padding with the following remark settings:

settings: {
  spacedTable: true,
  paddedTable: false,
  stringLength: () => 3 // Or 0 (has the same effect in markdown-table)
}

The use case is tables with long cell content, for example in standard and Level/awesome. In these cases, the 'padded' option of remark-lint-table-cell-padding creates too much (git diff) noise. But the 'compact' option makes these big tables difficult to read.

I propose to add a 'fixed' option. Is that feasible?

Expected behaviour

This should be valid:

| foo | a long column | bar |
| --- | --- | --- |

Missing spaces or a length that isn't 3 should be invalid:

|foo | a long column | bar|
|--- | ------- | -|

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions