mirror of
https://github.com/freeCodeCamp/devdocs
synced 2024-11-16 19:48:10 +01:00
Fix leaflet documentation
This commit is contained in:
parent
5ca406de8e
commit
432b46fab3
2 changed files with 6 additions and 6 deletions
|
@ -483,7 +483,7 @@ credits = [
|
|||
'https://ctan.org/pkg/latex2e-help-texinfo/'
|
||||
], [
|
||||
'Leaflet',
|
||||
'2010-2019 Vladimir Agafonkin<br>© 2010-2011, CloudMade<br>Maps © OpenStreetMap contributors.',
|
||||
'2010-2021 Vladimir Agafonkin<br>© 2010-2011, CloudMade<br>Maps © OpenStreetMap contributors.',
|
||||
'BSD',
|
||||
'https://raw.githubusercontent.com/Leaflet/Leaflet/master/LICENSE'
|
||||
], [
|
||||
|
|
|
@ -14,14 +14,14 @@ module Docs
|
|||
options[:skip_links] = true
|
||||
|
||||
options[:attribution] = <<-HTML
|
||||
© 2010–2019 Vladimir Agafonkin<br>
|
||||
© 2010–2021 Vladimir Agafonkin<br>
|
||||
© 2010–2011, CloudMade<br>
|
||||
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
|
||||
|
|
Loading…
Reference in a new issue