fix(tables): render headerless tables (| | |) - #16
Merged
Conversation
A table whose header row is entirely empty cells vanished from the render. The parser took its column count from the header row, and parseTableRow trims trailing empty cells — so `| | |` collapsed to zero cells, every data row was normalized to zero columns, and the table views iterated an empty range. Only the border and header divider showed. - Parser: the separator row is authoritative for column count; the header row is padded to that width like data rows already were. - TableBlockView / PrintableTableView: skip the header band entirely when every header cell is blank, so a headerless table reads as the definition-list layout it is meant to be rather than an empty strip. Both also derive columnCount defensively and index headers safely. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Owner
|
Merged - and with impeccable timing: I hit this exact bug an hour before your PR landed, building a demo document with a definition-style table. Making the separator row authoritative for column count is the right root-cause fix, and skipping the header band for all-blank headers reads much better than an empty strip. The defensive columnCount and safe header indexing are appreciated too. Verified: unit test green, full suite passes, and the fix confirmed visually in a running build. Ships in v1.7.0. Thank you! |
Owner
|
v1.7.0 with this change is now live: https://github.com/b451c/quickmd/releases/tag/v1.7.0 - thanks again! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A table whose header row is entirely empty cells vanished from the render. The parser took its column count from the header row, and parseTableRow trims trailing empty cells — so
| | |collapsed to zero cells, every data row was normalized to zero columns, and the table views iterated an empty range. Only the border and header divider showed.