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