History

Merge pull request #1967 from Elchi3/remove-deleted-mdn

Remove skip paths of non-existent MDN pages

Simon Legner committed 3 years ago

Commit 6febd562 parents ecb1bfc 426be313 files · +1 −16Browse files

Unified · Split

3 files
  1. lib/docs/scrapers/mdn/html.rb +0 −6
  2. lib/docs/scrapers/mdn/javascript.rb +1 −8
  3. lib/docs/scrapers/mdn/svg.rb +0 −2
lib/docs/scrapers/mdn/html.rb+0−6
@@ -14,12 +14,6 @@ module Docs · 13 unmodified lines
14 14
15 options[:root_title] = 'HTML'15 options[:root_title] = 'HTML'
16 16
17 options[:skip] = %w(
18 /index
19 /Element/shadow
20 /Element/webkit-meter-optimum-value
21 )
22
23 options[:replace_paths] = {17 options[:replace_paths] = {
24 '/Element/h1' => '/Element/Heading_Elements',18 '/Element/h1' => '/Element/Heading_Elements',
25 '/Element/h2' => '/Element/Heading_Elements',19 '/Element/h2' => '/Element/Heading_Elements',
lib/docs/scrapers/mdn/javascript.rb+1−8
@@ -15,15 +15,8 @@ module Docs · 14 unmodified lines
15 15
16 options[:root_title] = 'JavaScript'16 options[:root_title] = 'JavaScript'
17 17
18 # Don't want
19 options[:skip] = %w(
20 /Methods_Index
21 /Properties_Index
22 /Operators/Legacy_generator_function
23 /Statements/Legacy_generator_function)
24
25 # Duplicates18 # Duplicates
26 options[:skip].concat %w(19 options[:skip] = %w(
27 /Global_Objects20 /Global_Objects
28 /Operators21 /Operators
29 /Statements)22 /Statements)
lib/docs/scrapers/mdn/svg.rb+0−2
@@ -25,8 +25,6 @@ module Docs · 24 unmodified lines
25 end25 end
26 end26 end
27 27
28 options[:skip] = %w(/Compatibility_sources /FAQ)
29
30 options[:fix_urls] = ->(url) do28 options[:fix_urls] = ->(url) do
31 url.sub! 'https://developer.mozilla.org/en-US/Web/SVG', Svg.base_url29 url.sub! 'https://developer.mozilla.org/en-US/Web/SVG', Svg.base_url
32 url.sub! 'https://developer.mozilla.org/en-US/docs/SVG', Svg.base_url30 url.sub! 'https://developer.mozilla.org/en-US/docs/SVG', Svg.base_url