History

crystal: update get_latest_version

Jasper van Merle committed 7 years ago

Commit 946fcc21 parent f47326e1 file · +2 −2Browse files

Unified · Split

lib/docs/scrapers/crystal.rb+2−2
@@ -52,8 +52,8 @@ module Docs · 51 unmodified lines
52 end52 end
53 53
54 def get_latest_version(opts)54 def get_latest_version(opts)
55 body = fetch('https://crystal-lang.org/api', opts)55 doc = fetch_doc('https://crystal-lang.org/', opts)
56 body.scan(/Crystal Docs ([0-9.]+)/)[0][0]56 doc.at_css('.latest-release').content.scan(/([0-9.]+)/)[0][0]
57 end57 end
58 end58 end
59end59end

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t