Przeglądaj źródła

Update D3.js documentation (3.5.16)

Thibaut Courouble 9 lat temu
rodzic
commit
4923f4a009
2 zmienionych plików z 3 dodań i 3 usunięć
  1. 2 2
      lib/docs/filters/d3/clean_html.rb
  2. 1 1
      lib/docs/scrapers/d3.rb

+ 2 - 2
lib/docs/filters/d3/clean_html.rb

@@ -4,7 +4,7 @@ module Docs
       def call
         # Remove links inside <h2> and add "id" attributes
         css('h2 > a').each do |node|
-          node.parent['id'] = node['name'].remove('user-content-') if node['name']
+          node.parent['id'] = (node['id'] || node['name']).remove('user-content-') if node['id'] || node['name']
           node.before(node.children).remove
         end
 
@@ -18,7 +18,7 @@ module Docs
 
         # Move content to the root-level
         css('#wiki-content').each do |node|
-          node.before(node.at_css('.markdown-body').children).remove
+          node.before(node.at_css('#wiki-body .markdown-body').children).remove
         end
 
         # Make headings for function definitions and add "id" attributes

+ 1 - 1
lib/docs/scrapers/d3.rb

@@ -3,7 +3,7 @@ module Docs
     self.name = 'D3.js'
     self.slug = 'd3'
     self.type = 'd3'
-    self.release = '3.5.12'
+    self.release = '3.5.16'
     self.base_url = 'https://github.com/mbostock/d3/wiki/'
     self.root_path = 'API-Reference'
     self.links = {