Repository navigation
fix: preserve table rows with omitted end tags - #322
Open
DahanItamar wants to merge 2 commits into
Open
DahanItamar wants to merge 2 commits into
DahanItamar wants to merge 2 commits into
Conversation
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.
Fixes #302.
HTML tables may omit cell, row, and section end tags. The parser currently leaves those elements open across the next row or section, so later rows become descendants of earlier cells and can disappear from table queries.
This change closes the applicable cells and rows when a table section ends, and unwinds all applicable optional end tags when the next row or section starts. Nested tables keep their own rows, and
preserveTagNestingretains its existing behavior.The work is split into two commits: closing section boundaries, then handling successive rows and sections. Twenty regression cases cover the reported table, section transitions, nested tables, uppercase tags, and parser options.
Validation:
bun run compile).git diff --checkpassed.typescript.versionMajorMinoris undefined); the build and test checks above completed successfully.