From de294da7edc1def1beb0ce200e8034f11ded42c2 Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sat, 7 Dec 2024 16:16:33 +0100 Subject: [PATCH] Update Deno documentation (2.1.1) --- lib/docs/filters/deno/clean_html.rb | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/docs/filters/deno/clean_html.rb b/lib/docs/filters/deno/clean_html.rb index 46fc16e4..c3b3230b 100644 --- a/lib/docs/filters/deno/clean_html.rb +++ b/lib/docs/filters/deno/clean_html.rb @@ -8,12 +8,20 @@ module Docs @doc = at_css('main article .markdown-body') end + if at_css('.text-2xl') + doc.prepend_child at_css('.text-2xl').remove + at_css('.text-2xl').name = 'h1' + end + css('code').each do |node| if node['class'] lang = node['class'][/language-(\w+)/, 1] end node['data-language'] = lang || 'ts' node.remove_attribute('class') + if node.parent.name == 'div' + node.content = node.content.strip + end end css('a.header-anchor').remove()