From 1f97897b4087d1ce5e75650cecf007a0eaa9c34a Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sun, 21 Jun 2020 21:52:51 +0200 Subject: [PATCH] TextEditor: Use Web::PageView::load_html() for the markdown preview --- Applications/TextEditor/TextEditorWidget.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Applications/TextEditor/TextEditorWidget.cpp b/Applications/TextEditor/TextEditorWidget.cpp index af76c3566c..e0d14a3bc7 100644 --- a/Applications/TextEditor/TextEditorWidget.cpp +++ b/Applications/TextEditor/TextEditorWidget.cpp @@ -52,7 +52,6 @@ #include #include #include -#include #include TextEditorWidget::TextEditorWidget() @@ -563,7 +562,6 @@ void TextEditorWidget::update_markdown_preview() 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); + m_page_view->load_html(html, URL::create_with_file_protocol(m_path)); } }