mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-30 13:19:02 +00:00
Userland: Replace most printf-style APIs with AK::Format APIs :^)
This commit is contained in:
parent
4f1889c2cb
commit
f5c35fccca
Notes:
sideshowbarker
2024-07-18 17:02:37 +09:00
Author: https://github.com/linusg
Commit: f5c35fccca
Pull-request: https://github.com/SerenityOS/serenity/pull/7632
Reviewed-by: https://github.com/awesomekling
75 changed files with 642 additions and 644 deletions
|
@ -51,7 +51,7 @@ int main(int argc, char* argv[])
|
|||
success = file->open(Core::OpenMode::ReadOnly);
|
||||
}
|
||||
if (!success) {
|
||||
fprintf(stderr, "Error: %s\n", file->error_string());
|
||||
warnln("Error: {}", file->error_string());
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -67,10 +67,10 @@ int main(int argc, char* argv[])
|
|||
auto document = Markdown::Document::parse(input);
|
||||
|
||||
if (!document) {
|
||||
fprintf(stderr, "Error parsing\n");
|
||||
warnln("Error parsing");
|
||||
return 1;
|
||||
}
|
||||
|
||||
String res = html ? document->render_to_html() : document->render_for_terminal(view_width);
|
||||
printf("%s", res.characters());
|
||||
out("{}", res);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue