mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-07 09:04:30 +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:
committed by
Andreas Kling
parent
9a2177437b
commit
7ca562b200
@@ -169,15 +169,14 @@ void Editor::show_documentation_tooltip_if_available(const String& hovered_token
|
||||
return;
|
||||
}
|
||||
|
||||
Markdown::Document man_document;
|
||||
bool success = man_document.parse(file->read_all());
|
||||
auto man_document = Markdown::Document::parse(file->read_all());
|
||||
|
||||
if (!success) {
|
||||
if (!man_document) {
|
||||
dbg() << "failed to parse markdown";
|
||||
return;
|
||||
}
|
||||
|
||||
auto html_text = man_document.render_to_html();
|
||||
auto html_text = man_document->render_to_html();
|
||||
|
||||
auto html_document = Web::parse_html_document(html_text);
|
||||
if (!html_document) {
|
||||
|
||||
Reference in New Issue
Block a user