Unified · Split
| @@ -27,7 +27,7 @@ module Docs · 26 unmodified lines | |||
| 27 | end | 27 | end |
| 28 | 28 | ||
| 29 | def include_default_entry? | 29 | def include_default_entry? |
| 30 | !%w(Attributes Element/Heading_Elements).include?(slug) | 30 | !%w(Attributes Link_types Element/Heading_Elements).include?(slug) |
| 31 | end | 31 | end |
| 32 | 32 | ||
| 33 | def additional_entries | 33 | def additional_entries |
| @@ -39,6 +39,13 @@ module Docs · 5 unmodified lines | |||
| 39 | id = node.parent['id'] = name.parameterize | 39 | id = node.parent['id'] = name.parameterize |
| 40 | [name, id, 'Attributes'] | 40 | [name, id, 'Attributes'] |
| 41 | end | 41 | end |
| 42 | elsif slug == 'Link_types' | ||
| 43 | css('.standard-table td:first-child > code').map do |node| | ||
| 44 | name = node.content.strip | ||
| 45 | id = node.parent.parent['id'] = name.parameterize | ||
| 46 | name.prepend 'rel: ' | ||
| 47 | [name, id, 'Attributes'] | ||
| 48 | end | ||
| 42 | else | 49 | else |
| 43 | [] | 50 | [] |
| 44 | end | 51 | end |
| @@ -3,7 +3,7 @@ module Docs · 2 unmodified lines | |||
| 3 | self.name = 'HTML' | 3 | self.name = 'HTML' |
| 4 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML' | 4 | self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML' |
| 5 | self.root_path = '/Element' | 5 | self.root_path = '/Element' |
| 6 | self.initial_paths = %w(/Attributes) | 6 | self.initial_paths = %w(/Attributes /Link_types) |
| 7 | 7 | ||
| 8 | html_filters.push 'html/clean_html', 'html/entries', 'title' | 8 | html_filters.push 'html/clean_html', 'html/entries', 'title' |
| 9 | 9 | ||
| @@ -14,6 +14,8 @@ module Docs · 4 unmodified lines | |||
| 14 | 'Heading Elements' | 14 | 'Heading Elements' |
| 15 | elsif filter.slug == 'Attributes' | 15 | elsif filter.slug == 'Attributes' |
| 16 | 'Attributes' | 16 | 'Attributes' |
| 17 | elsif filter.slug == 'Link_types' | ||
| 18 | 'Link types' | ||
| 17 | else | 19 | else |
| 18 | "<#{filter.default_title}>" | 20 | "<#{filter.default_title}>" |
| 19 | end | 21 | end |