Skip to content

Commit de294da

Browse files
committed
Update Deno documentation (2.1.1)
1 parent 7195339 commit de294da

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

lib/docs/filters/deno/clean_html.rb

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,20 @@ def call
88
@doc = at_css('main article .markdown-body')
99
end
1010

11+
if at_css('.text-2xl')
12+
doc.prepend_child at_css('.text-2xl').remove
13+
at_css('.text-2xl').name = 'h1'
14+
end
15+
1116
css('code').each do |node|
1217
if node['class']
1318
lang = node['class'][/language-(\w+)/, 1]
1419
end
1520
node['data-language'] = lang || 'ts'
1621
node.remove_attribute('class')
22+
if node.parent.name == 'div'
23+
node.content = node.content.strip
24+
end
1725
end
1826

1927
css('a.header-anchor').remove()

0 commit comments

Comments
 (0)