mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:58:11 +00:00
LibMarkdown: Take a 'view_width' argument for render_for_terminal()
Some constructs will require the width of the terminal (or a general 'width') to be rendered correctly, such as tables.
This commit is contained in:
parent
5fbec2b003
commit
aa65f664a9
12 changed files with 30 additions and 14 deletions
|
@ -52,12 +52,12 @@ String Document::render_to_html() const
|
|||
return builder.build();
|
||||
}
|
||||
|
||||
String Document::render_for_terminal() const
|
||||
String Document::render_for_terminal(size_t view_width) const
|
||||
{
|
||||
StringBuilder builder;
|
||||
|
||||
for (auto& block : m_blocks) {
|
||||
auto s = block.render_for_terminal();
|
||||
auto s = block.render_for_terminal(view_width);
|
||||
builder.append(s);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue