Merge pull request #2291 from virtual256/pr_rust_1.79.0

fix rust 1.79.0 docs std crate indexing
pull/2294/head
Simon Legner 6 months ago committed by GitHub
commit fe0d469f17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -14,7 +14,7 @@
em.stab, span.stab { @extend %label; }
em.stab.unstable, span.stab.unstable { @extend %label-orange; }
.out-of-band { float: right; }
.since, .srclink {
.since, .src, .rightside {
float: right;
margin-left: .5rem;
}

@ -19,6 +19,7 @@ module Docs
css('.anchor').remove
css('.main-heading > h1').each do |node|
node.at('button')&.remove
node.parent.name = 'h1'
node.parent.content = node.content
end
@ -29,6 +30,8 @@ module Docs
end
end
css('.doc-anchor').remove
# Fix notable trait sections
css('.method, .rust.trait').each do |node|
traitSection = node.at_css('.notable-traits')

@ -9,6 +9,7 @@ module Docs
elsif slug == 'error-index'
'Compiler Errors'
else
at_css('main h1').at_css('button')&.remove
name = at_css('main h1').content.remove(/\A.+\s/).remove('⎘')
mod = slug.split('/').first
name.prepend("#{mod}::") unless name.start_with?(mod)

@ -3,7 +3,7 @@
module Docs
class Rust < UrlScraper
self.type = 'rust'
self.release = '1.79.0'
self.release = '1.80.0'
self.base_url = 'https://doc.rust-lang.org/'
self.root_path = 'book/index.html'
self.initial_paths = %w(

Loading…
Cancel
Save