FEATURE: Add Markdown table support with HTML fallback#13
Open
FEATURE: Add Markdown table support with HTML fallback#13
Conversation
Add table parsing and rendering across all four parsers (BBCode, HTML,
TextFormatter, MediaWiki) with Markdown pipe-table output by default
and automatic HTML fallback for complex tables.
Markdown tables are used when: all rows have the same cell count, no
cell content contains newlines, and the table is not nested. Otherwise,
the renderer falls back to HTML <table> output with proper thead/tbody.
- Add AST nodes: Table, TableRow, TableCell (with header flag)
- Add BBCode handlers with auto-close for [table], [tr], [td]/[th]
- Add HTML handlers for <table>, <tr>, <td>/<th> (thead/tbody transparent)
- Add TextFormatter handlers for TABLE, TR, TD/TH elements
- Add MediaWiki parser support for {| ... |} table syntax
- Add TableTag renderer with Markdown-first, HTML-fallback strategy
- Add unit and system tests for all parsers and renderer
486c020 to
4c37601
Compare
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.
Add table parsing and rendering across all four parsers (BBCode, HTML,
TextFormatter, MediaWiki) with Markdown pipe-table output by default
and automatic HTML fallback for complex tables.
Markdown tables are used when: all rows have the same cell count, no
output with proper thead/tbody.cell content contains newlines, and the table is not nested. Otherwise,
the renderer falls back to HTML
Table,TableRow,TableCell(with header flag)[table],[tr],[td]/[th]<table>,<tr>,<td>/<th>(thead/tbody transparent)TABLE,TR,TD/THelements{| ... |}table syntaxTableTagrenderer with Markdown-first, HTML-fallback strategy