diff --git a/assets/javascripts/templates/pages/about_tmpl.coffee b/assets/javascripts/templates/pages/about_tmpl.coffee
index 4ea79656..5cbc121d 100644
--- a/assets/javascripts/templates/pages/about_tmpl.coffee
+++ b/assets/javascripts/templates/pages/about_tmpl.coffee
@@ -483,7 +483,7 @@ credits = [
'https://ctan.org/pkg/latex2e-help-texinfo/'
], [
'Leaflet',
- '2010-2019 Vladimir Agafonkin
© 2010-2011, CloudMade
Maps © OpenStreetMap contributors.',
+ '2010-2021 Vladimir Agafonkin
© 2010-2011, CloudMade
Maps © OpenStreetMap contributors.',
'BSD',
'https://raw.githubusercontent.com/Leaflet/Leaflet/master/LICENSE'
], [
diff --git a/lib/docs/scrapers/leaflet.rb b/lib/docs/scrapers/leaflet.rb
index 69abef25..31ec27e7 100644
--- a/lib/docs/scrapers/leaflet.rb
+++ b/lib/docs/scrapers/leaflet.rb
@@ -14,14 +14,14 @@ module Docs
options[:skip_links] = true
options[:attribution] = <<-HTML
- © 2010–2019 Vladimir Agafonkin
+ © 2010–2021 Vladimir Agafonkin
© 2010–2011, CloudMade
Maps © OpenStreetMap contributors.
HTML
version '1.7' do
self.release = '1.7.1'
- self.base_url = "https://leafletjs.com/reference-#{release}.html"
+ self.base_url = "https://leafletjs.com/reference.html"
end
version '1.6' do
@@ -60,9 +60,9 @@ module Docs
end
def get_latest_version(opts)
- doc = fetch_doc('https://leafletjs.com/index.html', opts)
- link = doc.css('ul > li > a').to_a.select {|node| node.content == 'Docs'}.first
- link['href'].scan(/reference-([0-9.]+)\.html/)[0][0]
+ doc = fetch_doc('https://leafletjs.com/reference-versions.html', opts)
+ link = doc.at_css('.container > ul > li:last-child > a').content
+ link.sub(/[a-zA-Z\s]*/, '')
end
end
end