diff options
Diffstat (limited to 'Applications/TextEditor/TextEditorWidget.cpp')
-rw-r--r-- | Applications/TextEditor/TextEditorWidget.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Applications/TextEditor/TextEditorWidget.cpp b/Applications/TextEditor/TextEditorWidget.cpp index 6884335e2c..2f550507c2 100644 --- a/Applications/TextEditor/TextEditorWidget.cpp +++ b/Applications/TextEditor/TextEditorWidget.cpp @@ -560,9 +560,9 @@ void TextEditorWidget::set_markdown_preview_enabled(bool enabled) void TextEditorWidget::update_markdown_preview() { - Markdown::Document document; - if (document.parse(m_editor->text())) { - auto html = document.render_to_html(); + auto document = Markdown::Document::parse(m_editor->text()); + if (document) { + auto html = document->render_to_html(); auto html_document = Web::parse_html_document(html, URL::create_with_file_protocol(m_path)); m_page_view->set_document(html_document); } |