History

leaflet: get_npm_version

Simon Legner committed 4 years ago

Commit 5d7e8b91 parent 93ffb391 file · +1 −3Browse files

Unified · Split

lib/docs/scrapers/leaflet.rb+1−3
@@ -70,9 +70,7 @@ module Docs · 69 unmodified lines
70 end70 end
71 71
72 def get_latest_version(opts)72 def get_latest_version(opts)
73 doc = fetch_doc('https://leafletjs.com/reference-versions.html', opts)73 get_npm_version('leaflet', opts)
74 link = doc.at_css('.container > ul > li:last-child > a').content
75 link.sub(/[a-zA-Z\s]*/, '')
76 end74 end
77 end75 end
78end76end