Merge pull request #1298 from simon04/leaflet-1.7

leaflet: add version 1.7.1
pull/1301/head
Simon Legner 4 years ago committed by GitHub
commit ee57f17858
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -8,25 +8,25 @@ module Docs
node.name = 'h2'
end
at_css('> h2:first-child').name = 'h1'
# remove "This reference reflects Leaflet 1.2.0."
css('h1 ~ p').each do |node|
# remove "This reference reflects Leaflet"
css('p:contains("This reference reflects Leaflet")').each do |node|
node.remove
break
end
at_css('> h2:first-child').name = 'h1'
css('section', 'code b', '.accordion', '.accordion-overflow', '.accordion-content').each do |node|
node.before(node.children).remove
end
css('pre > code').each do |node|
node['class'] ||= ''
lang = if node['class'].include?('lang-html') || node.content =~ /\A</
lang = if node['class'].include?('lang-html') || node['class'].include?('language-html') || node.content =~ /\A</
'html'
elsif node['class'].include?('lang-css')
elsif node['class'].include?('lang-css') || node['class'].include?('language-css')
'css'
elsif node['class'].include?('lang-js') || node['class'].include?('lang-javascript')
elsif node['class'].include?('lang-js') || node['class'].include?('language-js') || node['class'].include?('lang-javascript')
'javascript'
end
node.parent['data-language'] = lang if lang

@ -19,6 +19,11 @@ module Docs
Maps &copy; OpenStreetMap contributors.
HTML
version '1.7' do
self.release = '1.7.1'
self.base_url = "https://leafletjs.com/reference-#{release}.html"
end
version '1.6' do
self.release = '1.6.0'
self.base_url = "https://leafletjs.com/reference-#{release}.html"

Loading…
Cancel
Save