| @@ -37,12 +37,14 @@ module Docs · 36 unmodified lines |
| 37 | css('.standard-table td:first-child').each_with_object [] do |node, entries| | 37 | css('.standard-table td:first-child').each_with_object [] do |node, entries| |
| 38 | next if node.next_element.content.include?('Global attribute') | 38 | next if node.next_element.content.include?('Global attribute') |
| 39 | name = "#{node.content.strip} (attribute)" | 39 | name = "#{node.content.strip} (attribute)" |
| | 40 | name = "#{node.at_css('code').content.strip} (attribute)" if node.at_css('code') |
| 40 | id = node.parent['id'] = name.parameterize | 41 | id = node.parent['id'] = name.parameterize |
| 41 | entries << [name, id, 'Attributes'] | 42 | entries << [name, id, 'Attributes'] |
| 42 | end | 43 | end |
| 43 | elsif slug == 'Link_types' | 44 | elsif slug == 'Link_types' |
| 44 | css('.standard-table td:first-child > code').map do |node| | 45 | css('.standard-table td:first-child > code').map do |node| |
| 45 | name = node.content.strip | 46 | name = node.content.strip |
| | 47 | name = "#{node.at_css('code').content.strip} (attribute)" if node.at_css('code') |
| 46 | id = node.parent.parent['id'] = name.parameterize | 48 | id = node.parent.parent['id'] = name.parameterize |
| 47 | name.prepend 'rel: ' | 49 | name.prepend 'rel: ' |
| 48 | [name, id, 'Attributes'] | 50 | [name, id, 'Attributes'] |