mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 20:47:45 +00:00
LibMarkdown: Preserve blank lines in CodeBlock
s
Specifically, `CodeBlock::render_lines_for_terminal()` eats up blank lines because it uses `DeprecatedString::split()` without the `SplitBehavior::KeepEmpty` enum. Easy fix: use the enum.
This commit is contained in:
parent
e0e027c17c
commit
bed5a752df
1 changed files with 1 additions and 2 deletions
|
@ -66,9 +66,8 @@ Vector<DeprecatedString> CodeBlock::render_lines_for_terminal(size_t) const
|
|||
indentation = " "sv;
|
||||
}
|
||||
|
||||
for (auto const& line : m_code.split('\n'))
|
||||
for (auto const& line : m_code.split('\n', SplitBehavior::KeepEmpty))
|
||||
lines.append(DeprecatedString::formatted("{}{}", indentation, line));
|
||||
lines.append("");
|
||||
|
||||
return lines;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue