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
5252 end
5353
5454 def get_latest_version(opts)
55− body = fetch('https://crystal-lang.org/api', opts)
56− body.scan(/Crystal Docs ([0-9.]+)/)[0][0]
55+ doc = fetch_doc('https://crystal-lang.org/', opts)
56+ doc.at_css('.latest-release').content.scan(/([0-9.]+)/)[0][0]
5757 end
5858 end
5959 end

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