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:
FalseHonesty 2020-05-11 13:55:31 -04:00 committed by Andreas Kling
commit 7ca562b200
Notes: sideshowbarker 2024-07-19 05:59:02 +09:00
8 changed files with 28 additions and 28 deletions

View file

@ -32,12 +32,12 @@
namespace Markdown {
class Document final {
class Document final : public RefCounted<Document> {
public:
String render_to_html() const;
String render_for_terminal() const;
bool parse(const StringView&);
static RefPtr<Document> parse(const StringView&);
private:
NonnullOwnPtrVector<Block> m_blocks;