From e3ac739ebae2b89c204617f3c10dde250a554c7c Mon Sep 17 00:00:00 2001 From: Simon Legner Date: Sun, 5 Dec 2021 00:51:43 +0100 Subject: [PATCH] Update D3.js documentation (7.1.1) --- .../templates/pages/about_tmpl.coffee | 2 +- lib/docs/scrapers/d3.rb | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee index 144b4622..361d0d08 100644 --- a/assets/javascripts/templates/pages/about_tmpl.coffee +++ b/assets/javascripts/templates/pages/about_tmpl.coffee @@ -228,7 +228,7 @@ credits = [ 'https://raw.githubusercontent.com/dlang/phobos/master/LICENSE_1_0.txt' ], [ 'D3.js', - '2010-2020 Michael Bostock', + '2010-2021 Michael Bostock', 'BSD', 'https://raw.githubusercontent.com/d3/d3/master/LICENSE' ], [ diff --git a/lib/docs/scrapers/d3.rb b/lib/docs/scrapers/d3.rb index ef3c8e49..c623bf50 100644 --- a/lib/docs/scrapers/d3.rb +++ b/lib/docs/scrapers/d3.rb @@ -12,10 +12,26 @@ module Docs options[:container] = '.markdown-body' options[:attribution] = <<-HTML - © 2010–2020 Michael Bostock
+ © 2010–2021 Michael Bostock
Licensed under the BSD License. HTML + version '7' do + self.release = '7.1.1' + self.base_url = 'https://github.com/d3/' + self.root_path = 'd3/blob/master/API.md' + + html_filters.push 'd3/clean_html', 'd3/entries_v4' + + options[:only_patterns] = [/\Ad3[\-\w]+\z/, /\Ad3\/blob\/master\/changes\.md\z/i] + options[:skip_patterns] = [/3\.x-api-reference/] + + options[:fix_urls] = ->(url) do + url.sub! %r{/blob/master/readme.md}i, '' + url + end + end + version '6' do self.release = '6.7.0' self.base_url = 'https://github.com/d3/'