summaryrefslogtreecommitdiff
path: root/Applications/TextEditor
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-04-30 23:43:17 +0200
committerAndreas Kling <kling@serenityos.org>2020-04-30 23:43:17 +0200
commit88f7f9712dd251c17cc07ac5fd033cd384d6c740 (patch)
tree0045bbaf5d2f4c5232434bf0014d70755ef5c4e2 /Applications/TextEditor
parent770dedcc2382e97ac6f5b0345464883113ad29a9 (diff)
downloadserenity-88f7f9712dd251c17cc07ac5fd033cd384d6c740.zip
TextEditor: Use document path as base URL for markdown preview HTML
Diffstat (limited to 'Applications/TextEditor')
-rw-r--r--Applications/TextEditor/TextEditorWidget.cpp2
1 files changed, 1 insertions, 1 deletions
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);
}
}