mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
LibMarkdown: Change MD Document parse API to return a RefPtr
Markdown documents are now obtained via the static Document::parse method, which returns a RefPtr<Document>, or nullptr on failure.
This commit is contained in:
parent
9a2177437b
commit
7ca562b200
8 changed files with 28 additions and 28 deletions
|
@ -101,10 +101,9 @@ int main(int argc, char* argv[])
|
|||
|
||||
printf("%s(%s)\t\tSerenityOS manual\n", name, section);
|
||||
|
||||
Markdown::Document document;
|
||||
bool success = document.parse(source);
|
||||
ASSERT(success);
|
||||
auto document = Markdown::Document::parse(source);
|
||||
ASSERT(document);
|
||||
|
||||
String rendered = document.render_for_terminal();
|
||||
String rendered = document->render_for_terminal();
|
||||
printf("%s", rendered.characters());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue