From 88f7f9712dd251c17cc07ac5fd033cd384d6c740 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Thu, 30 Apr 2020 23:43:17 +0200 Subject: TextEditor: Use document path as base URL for markdown preview HTML --- Applications/TextEditor/TextEditorWidget.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Applications/TextEditor') diff --git a/Applications/TextEditor/TextEditorWidget.cpp b/Applications/TextEditor/TextEditorWidget.cpp index 5533b39620..7e0322e267 100644 --- a/Applications/TextEditor/TextEditorWidget.cpp +++ b/Applications/TextEditor/TextEditorWidget.cpp @@ -553,7 +553,7 @@ void TextEditorWidget::update_markdown_preview() Markdown::Document document; if (document.parse(m_editor->text())) { auto html = document.render_to_html(); - auto html_document = Web::parse_html_document(html); + auto html_document = Web::parse_html_document(html, URL::create_with_file_protocol(m_path)); m_html_view->set_document(html_document); } } -- cgit v1.2.3