From 9733524f8ad82b94288d1588561c2016cc16e49c Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Tue, 19 Dec 2023 16:30:53 +0000 Subject: [PATCH] LibWeb: Load markdown documents using the spec mechanism This basically just means it now goes through the `create_document_for_inline_content()` function. --- .../Libraries/LibWeb/DOM/DocumentLoading.cpp | 43 +++++++++++++------ 1 file changed, 29 insertions(+), 14 deletions(-) diff --git a/Userland/Libraries/LibWeb/DOM/DocumentLoading.cpp b/Userland/Libraries/LibWeb/DOM/DocumentLoading.cpp index fc3d6349f8..ab9d3e9030 100644 --- a/Userland/Libraries/LibWeb/DOM/DocumentLoading.cpp +++ b/Userland/Libraries/LibWeb/DOM/DocumentLoading.cpp @@ -25,12 +25,8 @@ namespace Web { -static bool build_markdown_document(DOM::Document& document, ByteBuffer const& data) +static WebIDL::ExceptionOr> load_markdown_document(HTML::NavigationParams& navigation_params) { - auto markdown_document = Markdown::Document::parse(data); - if (!markdown_document) - return false; - auto extra_head_contents = R"~~~(