mirror of
https://github.com/RGBCube/serenity
synced 2025-05-14 09:24:57 +00:00
LibMarkdown: Convert render_to_terminal to String
This commit converts render_to_terminal from DeprecatedString to return an ErrorOr<String>. This is to aid moving `man` away from DeprecatedString. I have opted not to convert render_to_html and render_to_inline_html for now to keep this commit as small as possible.
This commit is contained in:
parent
e247da507f
commit
e44abaa777
4 changed files with 14 additions and 8 deletions
|
@ -7,6 +7,7 @@
|
|||
#include <AK/Assertions.h>
|
||||
#include <AK/ByteBuffer.h>
|
||||
#include <AK/DeprecatedString.h>
|
||||
#include <AK/String.h>
|
||||
#include <AK/Utf8View.h>
|
||||
#include <LibCore/ArgsParser.h>
|
||||
#include <LibCore/File.h>
|
||||
|
@ -100,7 +101,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto document = Markdown::Document::parse(source);
|
||||
VERIFY(document);
|
||||
|
||||
DeprecatedString rendered = document->render_for_terminal(view_width);
|
||||
auto rendered = TRY(document->render_for_terminal(view_width));
|
||||
outln("{}", rendered);
|
||||
|
||||
// FIXME: Remove this wait, it shouldn't be necessary but Shell does not
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue