瀏覽代碼

Update HTML documentation

Simon Legner 3 年之前
父節點
當前提交
df0824a300
共有 2 個文件被更改,包括 3 次插入1 次删除
  1. 2 0
      lib/docs/filters/html/entries.rb
  2. 1 1
      lib/docs/scrapers/mdn/html.rb

+ 2 - 0
lib/docs/filters/html/entries.rb

@@ -37,12 +37,14 @@ module Docs
           css('.standard-table td:first-child').each_with_object [] do |node, entries|
             next if node.next_element.content.include?('Global attribute')
             name = "#{node.content.strip} (attribute)"
+            name = "#{node.at_css('code').content.strip} (attribute)" if node.at_css('code')
             id = node.parent['id'] = name.parameterize
             entries << [name, id, 'Attributes']
           end
         elsif slug == 'Link_types'
           css('.standard-table td:first-child > code').map do |node|
             name = node.content.strip
+            name = "#{node.at_css('code').content.strip} (attribute)" if node.at_css('code')
             id = node.parent.parent['id'] = name.parameterize
             name.prepend 'rel: '
             [name, id, 'Attributes']

+ 1 - 1
lib/docs/scrapers/mdn/html.rb

@@ -2,7 +2,7 @@ module Docs
   class Html < Mdn
     prepend FixInternalUrlsBehavior
 
-    # release = '2022-01-22'
+    # release = '2022-04-27'
     self.name = 'HTML'
     self.base_url = 'https://developer.mozilla.org/en-US/docs/Web/HTML'