History

Update Deno documentation (2.4.4)

Simon Legner committed 1 year ago

Commit 24591d41 parent 5d7ef833 files · +6 −4Browse files

Unified · Split

3 files
  1. lib/docs/filters/deno/clean_html.rb +2 −1
  2. lib/docs/filters/deno/entries.rb +1 −1
  3. lib/docs/scrapers/deno.rb +3 −2
lib/docs/filters/deno/clean_html.rb+2−1
@@ -3,7 +3,7 @@ module Docs · 2 unmodified lines
33 class CleanHtmlFilter < Filter
44 def call
55 if result[:path].start_with?('api/deno/')
6− @doc = at_css('main')
6+ @doc = at_css('main[id!="content"] article', 'main[id!="content"]')
77 else
88 @doc = at_css('main article .markdown-body')
99 end
@@ -25,6 +25,7 @@ module Docs · 15 unmodified lines
2525 end
2626
2727 css('a.header-anchor').remove()
28+ css('.breadcrumbs').remove()
2829
2930 doc
3031 end
lib/docs/filters/deno/entries.rb+1−1
@@ -4,7 +4,7 @@ module Docs · 3 unmodified lines
44
55 def get_name
66 if result[:path].start_with?('api/deno/')
7− at_css('main')['id'][/\Asymbol_([.\w]+)/, 1]
7+ at_css('main[id!="content"]')['id'][/\Asymbol_([.\w]+)/, 1]
88 else
99 at_css('main article h1').content
1010 end
lib/docs/scrapers/deno.rb+3−2
@@ -8,8 +8,9 @@ module Docs · 7 unmodified lines
88 }
99
1010 # https://github.com/denoland/manual/blob/main/LICENSE
11+ # https://github.com/denoland/deno/blob/main/LICENSE.md
1112 options[:attribution] = <<-HTML
12− &copy; 2018–2024 the Deno authors<br>
13+ &copy; 2018–2025 the Deno authors<br>
1314 Licensed under the MIT License.
1415 HTML
1516
@@ -17,7 +18,7 @@ module Docs · 1 unmodified line
1718 html_filters.push 'deno/entries', 'deno/clean_html'
1819
1920 version '2' do
20− self.release = '2.1.1'
21+ self.release = '2.4.4'
2122 self.base_url = 'https://docs.deno.com/'
2223 self.root_path = 'runtime'
2324 options[:only_patterns] = [/\Aruntime/, /\Aapi\/deno\/~/, /\Adeploy/, /\Asubhosting/]