Skip to content

fix(table): support omitted outer pipes#675

Open
samholmes wants to merge 1 commit into
MeanderingProgrammer:mainfrom
samholmes:fix/optional-table-pipes
Open

fix(table): support omitted outer pipes#675
samholmes wants to merge 1 commit into
MeanderingProgrammer:mainfrom
samholmes:fix/optional-table-pipes

Conversation

@samholmes

Copy link
Copy Markdown

Summary

  • accept GFM pipe tables with omitted leading and/or trailing pipes
  • calculate cell widths from explicit or implicit row boundaries
  • render missing outer edges virtually while preserving real pipe overlays
  • normalize overlay widths so full borders continue to render

Testing

  • tests/table_spec.lua: 8 passed, 0 failed
  • stylua --check lua/render-markdown/render/markdown/table.lua tests/table_spec.lua
  • luac -p lua/render-markdown/render/markdown/table.lua tests/table_spec.lua

The local full suite retains unrelated baseline/environment failures in callout and LaTeX tests because the installed parser differs and the tree-sitter CLI is unavailable.

Closes #673

GFM permits table rows without leading or trailing pipes, but the renderer required every cell boundary to have a literal pipe node. Use implicit row boundaries for layout while preserving complete rendered edges.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: Tables don't render correctly if the pipe at the end of line is missing

1 participant