Răsfoiți Sursa

Update Rust documentation (1.54.0)

Simon Legner 4 ani în urmă
părinte
comite
a2b004ba61
2 a modificat fișierele cu 6 adăugiri și 1 ștergeri
  1. 5 0
      lib/docs/filters/rust/clean_html.rb
  2. 1 1
      lib/docs/scrapers/rust.rb

+ 5 - 0
lib/docs/filters/rust/clean_html.rb

@@ -45,6 +45,11 @@ module Docs
           node.remove if node.content.include?('#[must_use]')
         end
 
+        css('details').each do |node|
+          node.css('summary:contains("Expand description")').remove
+          node.before(node.children).remove
+        end
+
         css('a.header').each do |node|
           unless node.first_element_child.nil?
             node.first_element_child['id'] = node['name'] || node['id']

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

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