Browse Source

Update Rust documentation (1.60.0)

Simon Legner 3 năm trước cách đây
mục cha
commit
9cd9af0b14
2 tập tin đã thay đổi với 7 bổ sung2 xóa
  1. 6 1
      lib/docs/filters/rust/clean_html.rb
  2. 1 1
      lib/docs/scrapers/rust.rb

+ 6 - 1
lib/docs/filters/rust/clean_html.rb

@@ -13,7 +13,7 @@ module Docs
             node.before(node.children).remove
           end
         else
-          @doc = at_css('#main')
+          @doc = at_css('#main, #main-content')
 
           css('.toggle-wrapper').remove
 
@@ -21,6 +21,11 @@ module Docs
             node.content = node.at_css('.in-band').content
           end
 
+          css('.main-heading > h1.fqn').each do |node|
+            node.parent.name = 'h1'
+            node.parent.content = node.content
+          end
+
           css('.stability .stab').each do |node|
             node.name = 'span'
             node.content = node.content

+ 1 - 1
lib/docs/scrapers/rust.rb

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