Browse Source

Update D3.js documentation (4.10.0, 3.5.17)

Thibaut Courouble 8 years ago
parent
commit
aee166c2d3
2 changed files with 3 additions and 1 deletions
  1. 1 0
      lib/docs/filters/d3/clean_html.rb
  2. 2 1
      lib/docs/scrapers/d3.rb

+ 1 - 0
lib/docs/filters/d3/clean_html.rb

@@ -12,6 +12,7 @@ module Docs
 
         # Make headings for function definitions and add "id" attributes
         css('p > a:first-child').each do |node|
+          next unless node.parent
           next unless node['name'] || node.content == '#'
           parent = node.parent
           parent.name = 'h6'

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

@@ -8,6 +8,7 @@ module Docs
       code: 'https://github.com/d3/d3'
     }
 
+    options[:max_image_size] = 150_000
     options[:container] = '.markdown-body'
 
     options[:attribution] = <<-HTML
@@ -16,7 +17,7 @@ module Docs
     HTML
 
     version '4' do
-      self.release = '4.9.1'
+      self.release = '4.10.0'
       self.base_url = 'https://github.com/d3/'
       self.root_path = 'd3/blob/master/API.md'