Unified · Split
| @@ -5,21 +5,22 @@ module Docs · 4 unmodified lines | |||
| 5 | 5 | ||
| 6 | def get_name | 6 | def get_name |
| 7 | name = super | 7 | name = super |
| 8 | name.sub!('Element.', '').try(:downcase!) | 8 | name.sub!('Guides.', '') |
| 9 | name.sub!('Global attributes.', '').try(:concat, ' (attribute)') | 9 | name.sub!('How to.', '') |
| 10 | name.sub!('Reference.Elements.', '').try(:downcase!) | ||
| 11 | name.sub!('Reference.Attributes.', '').try(:concat, ' (attribute)') | ||
| 12 | name.sub!('Reference.Global attributes.', '').try(:concat, ' (attribute)') | ||
| 10 | name.sub!(/input\.([-\w]+)/, 'input type="\1"') | 13 | name.sub!(/input\.([-\w]+)/, 'input type="\1"') |
| 11 | name | 14 | name |
| 12 | end | 15 | end |
| 13 | 16 | ||
| 14 | def get_type | 17 | def get_type |
| 15 | return 'Miscellaneous' if slug.include?('CORS') || slug.include?('Using') | ||
| 16 | |||
| 17 | if at_css('.deprecated', '.non-standard', '.obsolete') | 18 | if at_css('.deprecated', '.non-standard', '.obsolete') |
| 18 | 'Obsolete' | 19 | 'Obsolete' |
| 19 | elsif slug.start_with?('Global_attr') | 20 | elsif slug.start_with?('Guides/') |
| 20 | 'Attributes' | 21 | 'Guides' |
| 21 | elsif slug.start_with?('Element/') | 22 | elsif slug.start_with?('Reference/') |
| 22 | 'Elements' | 23 | slug.split('/').drop(1).first.sub(/_/, ' ') |
| 23 | else | 24 | else |
| 24 | 'Miscellaneous' | 25 | 'Miscellaneous' |
| 25 | end | 26 | end |
| @@ -2,7 +2,7 @@ module Docs · 1 unmodified line | |||
| 2 | class Html < Mdn | 2 | class Html < Mdn |
| 3 | prepend FixInternalUrlsBehavior | 3 | prepend FixInternalUrlsBehavior |
| 4 | 4 | ||
| 5 | # release = '2024-08-20' | 5 | # release = '2025-06-01' |
| 6 | self.name = 'HTML' | 6 | self.name = 'HTML' |
| 7 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML' | 7 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML' |
| 8 | self.links = { | 8 | self.links = { |
| @@ -22,11 +22,5 @@ module Docs · 13 unmodified lines | |||
| 22 | '/Element/h5' => '/Element/Heading_Elements', | 22 | '/Element/h5' => '/Element/Heading_Elements', |
| 23 | '/Element/h6' => '/Element/Heading_Elements', | 23 | '/Element/h6' => '/Element/Heading_Elements', |
| 24 | '/Global_attributes/data-%2A' => '/Global_attributes/data-*' } | 24 | '/Global_attributes/data-%2A' => '/Global_attributes/data-*' } |
| 25 | |||
| 26 | options[:fix_urls] = ->(url) do | ||
| 27 | url.sub! 'https://developer.mozilla.org/en-US/docs/HTML/', "#{Html.base_url}/" unless url.include?('Content_categories') | ||
| 28 | url | ||
| 29 | end | ||
| 30 | |||
| 31 | end | 25 | end |
| 32 | end | 26 | end |
| @@ -18,7 +18,7 @@ module Docs · 17 unmodified lines | |||
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | options[:attribution] = <<-HTML | 20 | options[:attribution] = <<-HTML |
| 21 | © 2005–2024 MDN contributors.<br> | 21 | © 2005–2025 MDN contributors.<br> |
| 22 | Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later. | 22 | Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later. |
| 23 | HTML | 23 | HTML |
| 24 | 24 | ||