From 454bf1fde054591d1215404617126ce31b281171 Mon Sep 17 00:00:00 2001 From: Sam Atkins Date: Tue, 27 Sep 2022 11:40:14 +0100 Subject: [PATCH] HackStudio: Insert tooltip styling directly into Markdown HTML output --- Userland/DevTools/HackStudio/Editor.cpp | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/Userland/DevTools/HackStudio/Editor.cpp b/Userland/DevTools/HackStudio/Editor.cpp index 67e2ff7840..6f5a79fa63 100644 --- a/Userland/DevTools/HackStudio/Editor.cpp +++ b/Userland/DevTools/HackStudio/Editor.cpp @@ -218,14 +218,7 @@ void Editor::show_documentation_tooltip_if_available(String const& hovered_token return; } - StringBuilder html; - // FIXME: With the InProcessWebView we used to manipulate the document body directly, - // With OutOfProcessWebView this isn't possible (at the moment). The ideal solution - // is probably to tweak Markdown::Document::render_to_html() so we can inject styles - // into the rendered HTML easily. - html.append(man_document->render_to_html()); - html.append(""sv); - m_documentation_page_view->load_html(html.build(), {}); + m_documentation_page_view->load_html(man_document->render_to_html(""sv), {}); m_documentation_tooltip_window->move_to(screen_location.translated(4, 4)); m_documentation_tooltip_window->show();