Fix leaflet documentation

This commit is contained in:
Enoc 2021-12-05 16:36:56 -06:00
parent 5ca406de8e
commit 432b46fab3
2 changed files with 6 additions and 6 deletions

View file

@ -483,7 +483,7 @@ credits = [
'https://ctan.org/pkg/latex2e-help-texinfo/'
], [
'Leaflet',
'2010-2019 Vladimir Agafonkin<br>&copy; 2010-2011, CloudMade<br>Maps &copy; OpenStreetMap contributors.',
'2010-2021 Vladimir Agafonkin<br>&copy; 2010-2011, CloudMade<br>Maps &copy; OpenStreetMap contributors.',
'BSD',
'https://raw.githubusercontent.com/Leaflet/Leaflet/master/LICENSE'
], [

View file

@ -14,14 +14,14 @@ module Docs
options[:skip_links] = true
options[:attribution] = <<-HTML
&copy; 2010&ndash;2019 Vladimir Agafonkin<br>
&copy; 2010&ndash;2021 Vladimir Agafonkin<br>
&copy; 2010&ndash;2011, CloudMade<br>
Maps &copy; 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