RST Reader: Add col spans for simple tables#11115
Merged
Conversation
jgm
reviewed
Sep 8, 2025
Comment on lines
+64
to
+76
| tableWithSpans, | ||
| tableWithSpans', | ||
| widthsFromIndices, | ||
| gridTableWith, | ||
| gridTableWith', | ||
| TableComponents (..), | ||
| TableNormalization (..), | ||
| toTableComponents, | ||
| toTableComponents', | ||
| toTableComponentsWithSpans, | ||
| toTableComponentsWithSpans', | ||
| singleRowSpans, | ||
| singleColumnSpans, |
Owner
There was a problem hiding this comment.
This looks great! Just be sure to use the string [API change] in your commit message and indicate what has changed (this is an exported module).
Contributor
Author
There was a problem hiding this comment.
Okay, I added an explanation for the new functions into the commit message.
[API change] Text.Pandoc.Parsing: New functions `tableWithSpans`, `tableWithSpans'`, `toTableComponentsWithSpans` and `toTableComponentsWithSpans'` take a list of lists of (Blocks, RowSpan, ColSpan) to parse a Table with different RowSpan and ColSpan values accordingly. New helper functions `singleRowSpans` and `singleColumnSpans` help set all RowSpans or ColSpans to be 1 in case the table format only allows setting one or the other.
23c4408 to
29d44f4
Compare
Owner
|
thanks! |
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.
This adds col span support for simple tables into the RST reader. This is only the reader part of #10127.
Added a couple of additional functions into
GridTablethat useRowSpanandColSpanto support this.Also adjusted
simpleDashedLinesto not count trailing whitespaces after the last dashes as this would otherwise mess with aligning the col spans with the table border.