Closed PeterJFB closed 1 month ago
Could you add a more gracious fail when the table gets too big to render?
Could you add a more gracious fail when the table gets too big to render?
Updated balancing function to consider (relatively) large cells. Added support for empty cells, which also used to panic.
We're at a point where the implementation is relatively stable, it can be considered ready if nothing is added the next two days:)
Remaining work has been addressed :shipit:
textcomponent.rs
:transform_table
, which finds widths / heights of each cell based on some balancing formula, and splits any word which wrap within a cell.word_wrapping
, returning a list where each entry fits within a single linemarkdown_renderer.rs
Reimplementsrender_table
, using widths / heights and clipping to determine how many rows in each cell should be rendered (otherwise the cell will not be rendered(?)).parser.rs
andmd.pest
:Remaining work / considerations:
Copy
-trait onTextNode
enumTextNode
is part ofTextComponent
, which is already expensive to duplicate, i think is it a reasonable place to store the dynamically sized Table information, and improves some of the implicit handling of themeta_info
struct (seecontent_as_lines
andselected_heights
).