TextEditor: Use document path as base URL for markdown preview HTML

This commit is contained in:
Andreas Kling 2020-04-30 23:43:17 +02:00
parent 770dedcc23
commit 88f7f9712d
Notes: sideshowbarker 2024-07-19 07:08:51 +09:00

View file

@ -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);
}
}