History

Update HTML documentation

Simon Legner committed 4 years ago

Commit df0824a1 parent 2aac2052 files · +3 −1Browse files

Unified · Split

2 files
  1. lib/docs/filters/html/entries.rb +2 −0
  2. lib/docs/scrapers/mdn/html.rb +1 −1
lib/docs/filters/html/entries.rb+2−0
@@ -37,12 +37,14 @@ module Docs · 36 unmodified lines
3737 css('.standard-table td:first-child').each_with_object [] do |node, entries|
3838 next if node.next_element.content.include?('Global attribute')
3939 name = "#{node.content.strip} (attribute)"
40+ name = "#{node.at_css('code').content.strip} (attribute)" if node.at_css('code')
4041 id = node.parent['id'] = name.parameterize
4142 entries << [name, id, 'Attributes']
4243 end
4344 elsif slug == 'Link_types'
4445 css('.standard-table td:first-child > code').map do |node|
4546 name = node.content.strip
47+ name = "#{node.at_css('code').content.strip} (attribute)" if node.at_css('code')
4648 id = node.parent.parent['id'] = name.parameterize
4749 name.prepend 'rel: '
4850 [name, id, 'Attributes']
lib/docs/scrapers/mdn/html.rb+1−1
@@ -2,7 +2,7 @@ module Docs · 1 unmodified line
22 class Html < Mdn
33 prepend FixInternalUrlsBehavior
44
5− # release = '2022-01-22'
5+ # release = '2022-04-27'
66 self.name = 'HTML'
77 self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML'
88