Skip to content

Commit

Permalink
Update Deno documentation (2.1.1)
Browse files Browse the repository at this point in the history
  • Loading branch information
simon04 committed Dec 7, 2024
1 parent 7195339 commit de294da
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions lib/docs/filters/deno/clean_html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,20 @@ def call
@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()
Expand Down

0 comments on commit de294da

Please sign in to comment.