Explorar o código

Update Deno documentation (2.4.4)

Simon Legner hai 3 meses
pai
achega
24591d462e

+ 2 - 1
lib/docs/filters/deno/clean_html.rb

@@ -3,7 +3,7 @@ module Docs
     class CleanHtmlFilter < Filter
       def call
         if result[:path].start_with?('api/deno/')
-          @doc = at_css('main')
+          @doc = at_css('main[id!="content"] article', 'main[id!="content"]')
         else
           @doc = at_css('main article .markdown-body')
         end
@@ -25,6 +25,7 @@ module Docs
         end
 
         css('a.header-anchor').remove()
+        css('.breadcrumbs').remove()
 
         doc
       end

+ 1 - 1
lib/docs/filters/deno/entries.rb

@@ -4,7 +4,7 @@ module Docs
 
       def get_name
         if result[:path].start_with?('api/deno/')
-          at_css('main')['id'][/\Asymbol_([.\w]+)/, 1]
+          at_css('main[id!="content"]')['id'][/\Asymbol_([.\w]+)/, 1]
         else
           at_css('main article h1').content
         end

+ 3 - 2
lib/docs/scrapers/deno.rb

@@ -8,8 +8,9 @@ module Docs
     }
 
     # https://github.com/denoland/manual/blob/main/LICENSE
+    # https://github.com/denoland/deno/blob/main/LICENSE.md
     options[:attribution] = <<-HTML
-      &copy; 2018–2024 the Deno authors<br>
+      &copy; 2018–2025 the Deno authors<br>
       Licensed under the MIT License.
     HTML
 
@@ -17,7 +18,7 @@ module Docs
     html_filters.push 'deno/entries', 'deno/clean_html'
 
     version '2' do
-      self.release = '2.1.1'
+      self.release = '2.4.4'
       self.base_url = 'https://docs.deno.com/'
       self.root_path = 'runtime'
       options[:only_patterns] = [/\Aruntime/, /\Aapi\/deno\/~/, /\Adeploy/, /\Asubhosting/]