History

fix rust 1.79.0 docs std crate indexing

Virtual256 committed 2 years ago

Commit 7ff958a1 parent 7d24d972 files · +2 −0Browse files

Unified · Split

2 files
  1. lib/docs/filters/rust/clean_html.rb +1 −0
  2. lib/docs/filters/rust/entries.rb +1 −0
lib/docs/filters/rust/clean_html.rb+1−0
@@ -19,6 +19,7 @@ module Docs · 18 unmodified lines
19 css('.anchor').remove19 css('.anchor').remove
20 20
21 css('.main-heading > h1').each do |node|21 css('.main-heading > h1').each do |node|
22 node.at('button')&.remove
22 node.parent.name = 'h1'23 node.parent.name = 'h1'
23 node.parent.content = node.content24 node.parent.content = node.content
24 end25 end
lib/docs/filters/rust/entries.rb+1−0
@@ -9,6 +9,7 @@ module Docs · 8 unmodified lines
9 elsif slug == 'error-index'9 elsif slug == 'error-index'
10 'Compiler Errors'10 'Compiler Errors'
11 else11 else
12 at_css('main h1').at_css('button')&.remove
12 name = at_css('main h1').content.remove(/\A.+\s/).remove('⎘')13 name = at_css('main h1').content.remove(/\A.+\s/).remove('⎘')
13 mod = slug.split('/').first14 mod = slug.split('/').first
14 name.prepend("#{mod}::") unless name.start_with?(mod)15 name.prepend("#{mod}::") unless name.start_with?(mod)